█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 3379

Problema 0x25 - Suma de un subarreglo grande

  • Autor: juanan150
  • Fecha: 2021-03-12 17:01:15 UTC (Hace alrededor de 3 años)
Caso # Resultado Tiempo Memoria
#1
Correcto
0.03 s 3 KBi
#2
Correcto
0.028 s 3 KBi
#3
Correcto
0.027 s 3 KBi
#4
Correcto
0.031 s 3 KBi
#5
Correcto
0.03 s 3 KBi
#6
Correcto
0.051 s 3 KBi
#7
Correcto
0.032 s 3 KBi
#8
Tiempo límite excedido
1.042 s 4 KBi
#9
Esperando resultado...
#10
Esperando resultado...
#11
Esperando resultado...
#12
Esperando resultado...
#13
Correcto
0.802 s 9 KBi
#14
Tiempo límite excedido
1.053 s 9 KBi
Puntos totales: 58 / 100

Código

N = int(input())
listn = list(map(int,input().split()))
cases = int(input())

for i in range(cases):
    p,q=[int(x) for x in input().split()]
    list_fin = listn[p:q+1]
    val = sum(list_fin)
    print(val)