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

Envío 3278

Problema 0x62 - Contar elementos mayores a X en un arreglo pequeño

  • Autor: josuedzp
  • Fecha: 2021-03-07 10:41:24 UTC (Hace alrededor de 3 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 11, in <module>
    if consultas[i] < elementos[i]:
IndexError: list index out of range
0.025 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 11, in <module>
    if consultas[i] < elementos[i]:
IndexError: list index out of range
0.023 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 11, in <module>
    if consultas[i] < elementos[i]:
IndexError: list index out of range
0.025 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 11, in <module>
    if consultas[i] < elementos[i]:
IndexError: list index out of range
0.027 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 11, in <module>
    if consultas[i] < elementos[i]:
IndexError: list index out of range
0.025 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 11, in <module>
    if consultas[i] < elementos[i]:
IndexError: list index out of range
0.025 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 11, in <module>
    if consultas[i] < elementos[i]:
IndexError: list index out of range
0.024 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 11, in <module>
    if consultas[i] < elementos[i]:
IndexError: list index out of range
0.028 s 3 KBi
#9
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 11, in <module>
    if consultas[i] < elementos[i]:
IndexError: list index out of range
0.025 s 3 KBi
#10
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 11, in <module>
    if consultas[i] < elementos[i]:
IndexError: list index out of range
0.028 s 3 KBi
Puntos totales: 0 / 100

Código

n_elementos = int(input())
elementos = [int(x) for x in input().split(" ",n_elementos-1)]

n_consultas = int(input())
consultas = [int(x) for x in input().split(" ",n_consultas-1)]


for i in range(0, n_consultas-1):
  contador = 0
  for i in range(0, n_elementos-1):
    if consultas[i] < elementos[i]:
      contador += 1
  print(contador)