Skip to content

Instantly share code, notes, and snippets.

@libert-xyz
Created July 2, 2016 05:49
Show Gist options
  • Select an option

  • Save libert-xyz/9f8dfbf52b2e4543cdf1c5ff3e4e3e6e to your computer and use it in GitHub Desktop.

Select an option

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.
#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