Find the Runner-Up Score!

Sort by

recency

|

8360 Discussions

|

  • + 0 comments

    if name == 'main': n = int(input()) arr = map(int, input().split()) s = set(arr) s.remove(max(s)) print(max(s))

  • + 0 comments

    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)])

  • + 0 comments

    a = set(arr)

    a.remove(max(a))

    print(max(a))

  • + 0 comments
    if __name__ == '__main__':
        n = int(input())
        arr = map(int, input().split())
        new_list = list(set([rscore for rscore in arr]))
        new_list.sort()
        print(new_list[-2])
    
  • + 0 comments

    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])