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

Envío 709

Problema 0x25 - Suma de un subarreglo grande

  • Autor: abatesins
  • Fecha: 2020-09-14 13:12:06 UTC (Hace más de 4 años)
Caso # Resultado Tiempo Memoria
#1
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.032 s 3 KBi
#2
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.029 s 3 KBi
#3
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.034 s 3 KBi
#4
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.023 s 3 KBi
#5
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.023 s 3 KBi
#6
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.03 s 3 KBi
#7
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.032 s 3 KBi
#8
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.032 s 4 KBi
#9
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.044 s 10 KBi
#10
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.059 s 12 KBi
#11
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.069 s 9 KBi
#12
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.053 s 11 KBi
#13
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.051 s 9 KBi
#14
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 4, in <module>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
  File "script.py", line 4, in <listcomp>
    qs = [list(map(int, input.split(' '))) for _ in range(n_q)]
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
0.047 s 9 KBi
Puntos totales: 0 / 100

Código

n_arr = int(input())
arr = [int(i) for i in input().split(' ')]
n_q = int(input())
qs = [list(map(int, input.split(' '))) for _ in range(n_q)]

sums = []
for q0, q1 in qs:
  sums.append(sum(arr[q0:q1+1]))

print('\n'.join([str(s) for s in sums]))