TOPIC

RUNTIMER ERROR, ALGUEM CONSEGUE ME AJUDAR?

Mario Queiroz asked 8 months ago

No compilador deu tudo certo, no entanto, no uri não funcionou

soma = soma1 = 0

x = 0

N = int(input())

lista = []

for i in range(N):

k = int(input())

lista.append(k)

i = 0

soma = lista[i]+lista[i+1]

print(soma)

for i in range(1,N-1,1):

soma1 = lista[i]+lista[i+1]+lista[i-1]

print(soma1)

i=(N-1)

soma2 = lista[i]+lista[i-1]

print(soma2)

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

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