Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
55542 | wangchenglin | 期中考试成绩排序 | Python3 | 通过 | 31 MS | 3684 KB | 245 | 2024-11-08 12:05:58 |
n = int(input()) students = [] for _ in range(n): students.append(input().split()) sorted_students = sorted(students, key=lambda x: (-int(x[1]), x[0])) for student in sorted_students: print(f"{student[0]} {student[1]}")