Find the Runner-Up Score!

Sort by

recency

|

8427 Discussions

|

  • + 0 comments

    n = int(input()) # 5 arr = map(int, input().split()) # 2 3 6 6 5

    arr=list(arr) arr.sort() # 2 3 5 6 6 a=arr[n-1]

    for i in range (1,n): if(arr[n-(i+1)]

  • + 0 comments

    if name == 'main': n = int(input()) arr = map(int, input().split()) scores=list(set(arr)) scores.sort(reverse=True) print(scores[1])

  • + 0 comments

    time complexity : O(n)

    if name == 'main': n = int(input()) arr =list( map(int, input().split()))

    arr = set(arr)
    arr.remove(max(arr))
    print(max(arr)) 
    
  • + 0 comments

    print(sorted(set(arr))[-2])

  • + 0 comments

    n = int(input()) arr = map(int, input().split())

        arr=list(arr)
    arr.sort()
    a=arr[n-1]
    
    for i in range (1,n):
        if(arr[n-(i+1)]<a):
            print(arr[n-(i+1)])
            break