TOPIC
Runtime Error - Alguem poderia ajudar?
mqueiroz11 asked 3 years ago
qtdP = 1
cont = 0
while(qtdP>0): qtdP = int(input())
lista = [qtdP]
lista = list(map(int,input().split()))
for i in range(qtdP):
if(i > 0 and lista[i] - lista[i-1]<10):
j = lista[i]-lista[i-1]
cont = cont + j
else:
cont = cont + 10
print(cont)
cont = 0
This topic has not been answered yet. Be the first!