본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 14593번 2017 아주대학교 프로그래밍 경시대회 (Large)

by 현장 2023. 5. 8.

-Code

max_score = [0, 51, 180]
res_index = 0

for i in range(int(input())):
    s, c, l = map(int, input().split())
    if s > max_score[0] or (s == max_score[0] and c < max_score[1]) or (
            s == max_score[0] and c == max_score[1] and l < max_score[2]):
        max_score = [s, c, l]
        res_index = i

print(res_index + 1)