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.
Find the Runner-Up Score!
Find the Runner-Up Score!
Sort by
recency
|
8360 Discussions
|
Please Login in order to post a comment
if name == 'main': n = int(input()) arr = map(int, input().split()) s = set(arr) s.remove(max(s)) print(max(s))
a=list(arr) a.sort() largest=a[-1] c=0 for i in range(n-1,0,-1): if a[i]==largest: c+=1 print(a[-(c+1)])
a = set(arr)
a.remove(max(a))
print(max(a))
if name == 'main': n = int(input()) arr = map(int, input().split()) a = list(arr) a.sort() while a[-1] == a[-2]: a.pop() print(a[-2])