TOPIC

Why I'm getting Wrong Answer? [Python]

eliumoraes asked 6 years ago

My code seems to be working right, but I am getting 100% wrong answer. What is the problem?

x = int(1)
maria,joao = int(0),int(0)
x = input()
x = int(x)
if x != 0:
    for i in range(0,x):
        jogos = list(map(int, input().split()))
        for i in range(len(jogos)):
            if jogos[i] == 0:
                maria +=1
            else:
                joao +=1

        print("Mary won {0} times and John won {1} times".format(maria,joao))
        maria, joao = int(0), int(0)
        x = int(input())
        if x==0:
            break

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

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