Skip to content

Commit

Permalink
new file: hackerrank/python/hr-nested-lists.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsb committed Feb 12, 2020
1 parent cff1148 commit 2b1b943
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions hackerrank/python/hr-nested-lists.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
if __name__ == '__main__':
ls = []
min_score = 0

for i,e in enumerate(range(int(input()))):
name = input()
score = float(input())
if i == 0:
min_score = score
elif score < min_score:
min_score = score
ls.append([name, score])

ls = [[i[0], i[1]] for i in ls if i[1] != min_score]

min_score = min([i[1] for i in ls])

ls = [i[0] for i in ls if i[1] == min_score]

for i in sorted(ls):
print(i)

0 comments on commit 2b1b943

Please sign in to comment.