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.
my_list=[]#listofrecordsscore_list=[]#listforscorestoknowtargetscorefor_inrange(int(input())):name=input()score=float(input())my_list.append([name,score])score_list.append(score)min_score=min(score_list)#knowminimumscoretarget_score=max(score_list)#puttargetscoremaximumvalueforvalueinscore_list:# know the second minimum value (target)ifvalue>min_scoreandvalue<target_score:target_score=valuetarget_names=[]#toputnameshastargetscoreforiteminmy_list:ifitem[1]==target_score:target_names.append(item[0])target_names.sort()#sortnamealphabeticallyforxintarget_names:print(x)
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 →