Find the Runner-Up Score!

  • + 2 comments

    As for me, no function at all except list initialization.

    N = int(input())
    a = list(map(int,raw_input().split()))
    max1 = max2 = -100
    for i in a:
        if i > max1:
            max1 = i;
    i in a:
        if i > max2 and i != max1:
            max2 = i;        
    print max2