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.
for _ in range(int(input())):
name = input()
score = float(input())
list.append([name, score])
list.sort(key=lambda score: score[1])
lowest = list[0][1]
for name, score in list:
if score > lowest:
second_lowest = score
break
second_lowest_list = [name for name, score in list if score == second_lowest]
second_lowest_list.sort()
for name in second_lowest_list:
print(name)
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': list=[] second_lowest = int()