Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.02 s | 3 KBi |
#2 |
Incorrecto
|
0.025 s | 3 KBi |
#3 |
Incorrecto
|
0.028 s | 3 KBi |
#4 |
Incorrecto
|
0.023 s | 3 KBi |
#5 |
Incorrecto
|
0.023 s | 3 KBi |
#6 |
Incorrecto
|
0.019 s | 3 KBi |
#7 |
Incorrecto
|
0.016 s | 3 KBi |
#8 |
Incorrecto
|
0.061 s | 4 KBi |
#9 |
Incorrecto
|
0.22 s | 9 KBi |
#10 |
Incorrecto
|
0.246 s | 8 KBi |
#11 |
Incorrecto
|
0.185 s | 9 KBi |
#12 |
Incorrecto
|
0.259 s | 9 KBi |
#13 |
Incorrecto
|
0.192 s | 9 KBi |
#14 |
Incorrecto
|
0.194 s | 8 KBi |
n = input() input_array = input() array = [int(x) for x in input_array.split()] n = int(n) for i in range(1, n): array[i] = array[i] + array[i-1] c = input() c = int(c) outputs = [] for i in range(0, c): response = 0 input_pq = input() pq = [int(r) for r in input_pq.split()] p, q = pq[0], pq[1] if p == 0: response = array[q] else: response = array[q] - array[p-1] outputs.append(response) print(outputs)