<๋ฌธ์ ๋งํฌ>
https://www.acmicpc.net/problem/5635
5635๋ฒ: ์์ผ
์ด๋ค ๋ฐ์ ์๋ ํ์๋ค์ ์์ผ์ด ์ฃผ์ด์ก์ ๋, ๊ฐ์ฅ ๋์ด๊ฐ ์ ์ ์ฌ๋๊ณผ ๊ฐ์ฅ ๋ง์ ์ฌ๋์ ๊ตฌํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค.
www.acmicpc.net
<ํ์ด ์ ๋ต>
input์ ์ ๋ ฅ ๋ฐ๊ณ ์ฐ-์-์ผ ์์ผ๋ก ์ ๋ ฌํด์ฃผ๋ฉด ๋๋ค.
<์ ๋ต ์ฝ๋>
# 221218 5635 ์์ผ
# ์ ๋ต์ฝ๋
N = int(input())
students = [input().split() for _ in range(N)]
students.sort(key=lambda x: (int(x[3]), int(x[2]), int(x[1])))
print(students[-1][0])
print(students[0][0])
'โญ Problem_Solving > ๋ฐฑ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค] 17070 ํ์ดํ ์ฎ๊ธฐ๊ธฐ1 (Python/ํ์ด์ฌ) (0) | 2023.04.04 |
---|---|
[๋ฐฑ์ค] 2072 ์ค๋ชฉ (Python/ํ์ด์ฌ) (1) | 2022.12.28 |
[๋ฐฑ์ค] 2239 ์ค๋์ฟ (Python/ํ์ด์ฌ) (0) | 2022.11.10 |
[๋ฐฑ์ค] 11559 Puyo Puyo (Python/ํ์ด์ฌ) (0) | 2022.11.10 |
[๋ฐฑ์ค] 1253 ์ข๋ค (Python/ํ์ด์ฌ) (1) | 2022.11.08 |
๋๊ธ