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=[]
n=int(input())
for _ in range(n):
name=input()
score=float(input())
records.append([name, score])
marks=[record[1] for record in records]
sortmarks=sorted(set(marks))
second = sortmarks[1]
second_lowest_students=[record[0] for record in records if record[1]==second]
for name in sorted(second_lowest_students):
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': records=[] n=int(input()) for _ in range(n):