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':
records=[]
for _ in range(int(input())):
name = input()
score = float(input())
records.append([name, score])
s=set()
for i in range(len(records)):
s.add(records[i][1])
sc=list(s)
sl=sc[len(sc)-2]
n=[]
for i in range(len(records)):
if records[i][1]==sl:
n.append(records[i][0])
n.sort()
for i in range(len(n)):
print(n[i])
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 →
why isn't this working?
if name == 'main': records=[] for _ in range(int(input())): name = input() score = float(input()) records.append([name, score])