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

Envío 480

Problema 0x9d - ¿Está ordenado?

  • Autor: Andres Ariza
  • Fecha: 2020-09-06 16:33:18 UTC (Hace más 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 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.026 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 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
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 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.022 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 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.021 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 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.021 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 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.026 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 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.029 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 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.022 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 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.027 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 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.025 s 3 KBi
#11
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.028 s 3 KBi
#12
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 7, in <module>
    if arr[idx] <= arr[idx+1]:
IndexError: list index out of range
0.026 s 3 KBi
Puntos totales: 0 / 100

Código

num_elements = int(input())
array = input()
arr = [eval(num) for num in array.split()]
for idx in range(num_elements):
    if idx == num_elements - 1:
        print("Ordenado")
    if arr[idx] <= arr[idx+1]:
        continue
    else:
        print("Desordenado")