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.
n = int(input())
che = n
records = []
grades = []
maingrades = []
names = []
while(n != 0):
name = input()
score = float(input())
records.append([name,score])
n -=1
for i in range(len(records)):
for j in records[i]:
if (isinstance(j,float) == True) :
grades.append(j)
grades.sort()
lowest = grades[0]
for i in range(len(grades)):
if (grades[i] != lowest):
maingrades.append(grades[i])
for i in range(len(records)):
if (maingrades[0] in records[i]):
for j in records[i]:
if(isinstance(j,str) == True):
names.append(j)
names.sort()
for i in names:
print(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 →
if name == 'main':