TOPIC

Runtime Error

Gabriel483 asked 5 years ago

Não consigo encontrar problema algum, gera todas as saídas corretas, porém deu Runtime Error

while True:

a = int(input())

b = int(input())

if a == 0 and b == 0:

break

c = a + b

d = str(c)

i=0

while i != len(d):

if (d[i]=="0"):

  e = d.replace("0", "")

i+=1

print(e)

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

  • noyonict replied 4 years ago

    while True:
        m, n = input().split()
        if int(m) == 0 == int(n):
            break
        add = str(int(m) + int(n)).replace('0', '')
        print(add)
  • fcelestino0 replied 5 years ago

    Não sei quanto ao codigo completo, porém percebi que o URI quer a entrada de dados numa mesma linha. Utilize o comando a, b = map(int, input().split())