Skip to content

Instantly share code, notes, and snippets.

@gt50
Created July 28, 2017 04:49
Show Gist options
  • Save gt50/27bce66f47ad87ab9e5030875b6a3aba to your computer and use it in GitHub Desktop.
Save gt50/27bce66f47ad87ab9e5030875b6a3aba to your computer and use it in GitHub Desktop.
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