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__':n=int(input())arr=map(int,input().split())scores=list(set(arr))ifn<2andn>10:print("Invalid input: n must be between 2 and 10")foriinrange(len(scores)):ifscores[i]<-100orscores[i]>100:print("Invalid input: scores must be between -100 and 100")breakscores.sort()print(scores[-2]iflen(scores)>1elsescores[0])
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Runner-Up Score!
You are viewing a single comment's thread. Return to all comments →