Created
July 2, 2016 05:49
-
-
Save libert-xyz/9f8dfbf52b2e4543cdf1c5ff3e4e3e6e to your computer and use it in GitHub Desktop.
There will always be one or more students having the second lowest grade.
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
| #https://www.hackerrank.com/challenges/nested-list | |
| #7/2/16 | |
| n = int(raw_input()) | |
| student = [] | |
| for i in range(n): | |
| student.append([raw_input(),float(raw_input())]) | |
| student.sort() | |
| scores = set([s[1] for s in student]) | |
| score_l = sorted(list(scores)) | |
| for z in student: | |
| if z[1] == score_l[1]: | |
| print (z[0]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment