Created
July 28, 2017 04:49
-
-
Save gt50/27bce66f47ad87ab9e5030875b6a3aba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == '__main__': | |
students = [] | |
scores = [] | |
for _ in range(int(input())): | |
name = input() | |
score = float(input()) | |
students.append([name, score]) | |
scores.append(score) | |
scores = list(set(scores)) | |
students.sort(key = lambda x: (x[1], x[0])) | |
scores.sort() | |
for student in students: | |
if (student[1] == scores[1]): | |
print(student[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment