Find the Runner-Up Score!

  • + 0 comments

    Probably a bit of longer path:

    if __name__ == '__main__':
        n = int(input())
        arr = map(int, input().split())
        
        stored_list = list(arr)
        
        stored_list.sort(reverse=True)
        
        counter = 1
        for i in stored_list:
            if stored_list[counter]<i:
                print(stored_list[counter])
                break
            else:
                counter+=1