applicants = [
[1001, 80, 90],
[1002, 90, 80],
[1003, 85, 85]
]
applicants.sort(
key=lambda x: (-(x[1] + x[2]), -x[2], x[0])
)
answer = []
for a in applicants:
answer.append(a[0])
print(answer)
To embed this project on your website, copy the following code and paste it into your website's HTML: