Find the Runner-Up Score!

  • + 0 comments

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

    arr = list(arr)
    
    maxscore = max(arr)
    newScore = []
    for score in arr:
        if score != maxscore:
            newScore.append([score])
    
    runnerUp = max(newScore)
    Result = runnerUp[0]
    
    print(Result)