TOPIC

10% Wrong Answer

Kowalski asked 3 years ago

Meu código está recebendo 10% WA e não faço ideia do porque, alguém pode me ajudar?

n = int(input())
one, two, three = "one", "two", "three"
cont, flag, test1, test2, test3 = 0, True, True, True, True  

for i in range(n):
  s = input()

  if len(s) != len(one): flag = False

  if flag:
    for i in range(len(s)):
      if s[i] != one[i]: cont += 1

  if cont == 1: print(1)

  cont, flag = 0, True
  if len(s) != len(two): flag = False

  if flag:
    for i in range(len(s)):
      if s[i] != two[i]: cont += 1

  if cont == 1: print(2)

  cont, flag = 0, True
  if len(s) != len(three): flag = False

  if flag:
    for i in range(len(s)):
      if s[i] != three[i]: cont += 1

  if cont == 1: print(3)

print()

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

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