[백준] 국영수 10825번
람다 함수 사용, - 를 붙이면 Reverse = True
파이썬
import sys
input = sys.stdin.readline
n = int(input())
student = []
for i in range(n):
a,b,c,d = list(map(str,input().split()))
student.append([a,int(b),int(c),int(d)])
student.sort(key=lambda x: (-x[1], x[2],-x[3],x[0]))
for i in student:
print(i[0])
댓글남기기