TOPIC

10% wrong answer

Leonardo Fernandes Padre asked 4 months ago

while True:
    try:
        M = int(input())  
        if(2 <= M <= 20):
            j = 0
            V = []
            while j != M:
                aux = int(input())
                if(1 <= aux <= 500):
                    V.append(aux)
                    j += 1
            N = int(input())
            if(1 <= N <= M):
                soma = 0
                for i in range(M):
                    if(i*N <= M-1):
                        soma += V[i*N]
                t = 0
                for c in range(1, soma + 1):
                    if soma % c == 0:
                        t += 1
                if t == 2:
                    print('You’re a coastal aircraft, Robbie, a large silver aircraft.')
                else:
                    print('Bad boy! I’ll hit you.')
    except EOFError:
        break

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

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