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':
long = []
numb = []
names = []
for _ in range(int(input())):
name = input()
score = float(input())
long.append([name, score])
numb.append(score)
numb1 = list(set(numb))
numb1.sort()
for el in long:
if el[1] == numb1[1]:
names.append(el[0])
names.sort()
for _ in names:
print(_)
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': long = [] numb = [] names = [] for _ in range(int(input())): name = input() score = float(input()) long.append([name, score]) numb.append(score)
numb1 = list(set(numb)) numb1.sort() for el in long: if el[1] == numb1[1]: names.append(el[0]) names.sort() for _ in names: print(_)