TOPIC

Wrong Answer 100% Python 3? ??

Vitor Molica Portugal Torres asked 6 months ago

dados = input() dados = dados.split()

while True:

x = dados[0]
y = dados[1]

achar = y.find(x)
contar = y.count(x)

if int(x)==0  and int(y)==0:
    break
else:
    if achar < 0:

        print(int(y))
    elif contar == 1:
        if int(y) < 1:
            break
        elif int(y) < 10:
            print(int(y))
        else:
            concat = y[:achar] + y[achar + 1:]
            concat = int(concat)
            print(concat)
    else:
        lista = list(y)
        textofim = 0

        for j in range(0, len(lista)):
            aga = int(lista[j])
            if aga != int(x):
                textofim = textofim * 10 + aga

        print(textofim)
    dados = input("")
    dados = dados.split()

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

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