Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.022 s | 3 KBi |
#2 |
Correcto
|
0.023 s | 3 KBi |
#3 |
Correcto
|
0.019 s | 3 KBi |
#4 |
Correcto
|
0.024 s | 3 KBi |
#5 |
Correcto
|
0.022 s | 3 KBi |
#6 |
Correcto
|
0.025 s | 3 KBi |
#7 |
Correcto
|
0.023 s | 3 KBi |
#8 |
Correcto
|
0.059 s | 3 KBi |
#9 |
Correcto
|
0.089 s | 4 KBi |
#10 |
Correcto
|
0.089 s | 4 KBi |
#11 |
Correcto
|
0.091 s | 4 KBi |
#12 |
Correcto
|
0.084 s | 4 KBi |
#13 |
Correcto
|
0.092 s | 4 KBi |
#14 |
Correcto
|
0.09 s | 4 KBi |
# 0x25 - Suma de un subarreglo N = int(input()) arreglo = [int(x) for x in input().split()] C = int(input()) sumas = [0] acum = 0 for num in arreglo: acum+=num sumas.append(acum) for i in range(C): query = input().split() p= int(query[0]) q= int(query[1]) print(sumas[q+1]-sumas[p])