TOPIC
Wrong Answer - mas todos os casos teste passam
paulo.feresin asked 1 year ago
Não sei o que fazer mais. Poderiam dar uma luz?
linha1 = input().split()
Pulo = int(linha1[0]) # altura pulo
Canos = int(linha1[1]) # canos
tudo = input().split()
fase = []
while Canos >= 1:
for i in range(0, Canos):
fase.append(int(tudo[i]))
Canos -= 1
c = 0
j = 0
for i in range(len(fase)):
if fase[i] > (Pulo*2) or fase[i-1] < (fase[i]-Pulo):
c += 1
j += 1
else:
j += 1
if c != 0:
print("GAME OVER")
else:
print("YOU WIN")
This topic has not been answered yet. Be the first!