TOPIC

5% error, what's wrong? pls help. python language.

Pedro Nildo Costa Lima Da Silva asked 1 month ago

while True:
    m = 0
    p = 0
    n = int(input())
    if n == 0:
        break
    else:
        num = input().split()
        for i in range(n):
            if int(num[i]) > m:
                m = int(num[i])
                p = i
        num[p] = ""
        m2 = max(num)
        p = num.index(m2)
        print(p+1)

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.