백준 14592번: 2017 아주대학교 프로그래밍 경시대회 (Small) #Python

ColorlessDia·2024년 4월 22일

algorithm/baekjoon

목록 보기
153/836
import sys

N = int(sys.stdin.readline())

participant = dict()

for i in range(1, N + 1):
    S, C, L = map(int, sys.stdin.readline().split())

    participant[i] = [S, C, L]

print(sorted(participant.items(), key=lambda x: (-x[1][0], x[1][1], x[1][2]))[0][0])

0개의 댓글