We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
if name == 'main':
result = []
for _ in range(int(input())):
name = input()
score = float(input())
result.append([name,score])
result.sort(key=lambda x: (x[1]))
min = result[0][1]
for i in range(0,len(result)):
if result[0][1] == min:
result.remove(result[0])
min = result[0][1]
new = []
for i in range(0,len(result)):
if result[i][1] == min:
new.append(result[i])
new.sort(key=lambda x: (x[0]))
for i in range(0,len(new)):
print(new[i][0])
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Nested Lists
You are viewing a single comment's thread. Return to all comments →
if name == 'main': result = [] for _ in range(int(input())): name = input() score = float(input()) result.append([name,score])