Find the Runner-Up Score!

  • + 0 comments

    if name == 'main': N = int(input())

    # Read the scores as a map object and convert to a list of integers
    # The 'map' function output must be converted to a list explicitly.
    

    scores = list(map(int, input().split())) unique_scores = set(scores) sorted_unique_scores = sorted(list(unique_scores)) runner_up_score = sorted_unique_scores[-2]

    print(runner_up_score)