TOPIC

10% python 3

Rafael Bezerra Barbosa asked 6 months ago

I have no idea where is the error, all the test cases are successful so far

coin_number = int(input()) while coin_number != 0: primo = False coin_value = [] while coin_number > 0: coin_value.append(int(input())) coin_number -= 1 coin_value.sort(reverse=True)

jump = int(input())
somat = 0
index = 0
aux = jump

while index < len(coin_value):
    if aux == jump:
        somat += coin_value[index]
        aux = 0
    aux += 1
    index += 1
print("somat => " + str(somat))
divisores = 0
for divisor in range(2, somat):
    if somat % divisor == 0:
        divisores += 1
        if divisores > 1:
            break
if divisores == 0:
    primo = True

if primo:        
    defeat = False            
    print("You’re a coastal aircraft, Robbie, a large silver aircraft.")
else:
    print("Bad boy! I’ll hit you.")
coin_number = 0
try:
    coin_number = int(input())
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.