백준 - (#10825)

https://www.acmicpc.net/problem/10825


Code

n = int(input())

students = []
for i in range(n):
    name, kor, eng, math = input().split()
    students.append((name, kor, eng, math))

result = sorted(students, key= lambda x : (-int(x[1]),int(x[2]),-int(x[3]),x[0]))
for i in range(n):
    print(result[i][0])

좋은 웹페이지 즐겨찾기