문제링크 : https://www.acmicpc.net/problem/10825
import sys
n = int(sys.stdin.readline())
students = []
for _ in range(n):
student = list(sys.stdin.readline().split())
name = student[0]
k = int(student[1])
e = int(student[2])
m = int(student[3])
student = [name,k,e,m]
students.append(student)
students.sort(key=lambda x : (-x[1], x[2], -x[3], x[0]))
for student in students:
print(student[0])
파이썬의 sort함수와 key매개변수를 이용했기 때문에 문제 자체는 굉장히 간단하게 풀었다.