Find the Runner-Up Score!

Sort by

recency

|

8441 Discussions

|

  • + 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)

  • + 0 comments

    print(sorted(list(set(l)))[-2])

  • + 0 comments

    if name == 'main': n = int(input()) arr = map(int, input().split()) l = list(arr) k = set() for i in l: k.add(i) r = list(k) r.sort(reverse = True) print(r[1])

  • + 0 comments
    if __name__ == '__main__':
        n = int(input())
        arr = map(int, input().split())
        score = list(arr)
        flag=0
        if n>=2 and n<=10:
            if max(score)<=100 and min(score)>=-100:
                for i in range(0,(score.count(max(score)))):
                    score.remove(max(score))
        print(max(score))
    
  • + 0 comments

    if name == 'main': n = int(input()) arr = map(int, input().split()) score=[] lst=list(arr) for i in lst: if i not in score: score.append(i) score.sort() score.reverse() print(score[1])