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.
scores=list(map(int,input().split()))
alice=list(map(int,input().split()))
climberank=[]
for i in alice:
temp=set(sorted(scores))
temp.add(i)
for index,value in enumerate(sorted(temp,reverse=True),1):
if value==i:
climberank.append(index)
temp.discard(i)
print(*climberank)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Climbing the Leaderboard
You are viewing a single comment's thread. Return to all comments →