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

Envío 2869

Problema 0x9d - ¿Está ordenado?

  • Autor: josuedzp
  • Fecha: 2021-02-07 21:18:36 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.029 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.03 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.039 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.027 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.024 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.026 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.027 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.028 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.031 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.029 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 2, in <module>
    elementos = [int(x) for x in input().split(" ",len(n_elementos)-1)]
TypeError: object of type 'int' has no len()
0.027 s 3 KBi
Puntos totales: 0 / 100

Código

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

resultado = ""
for i in range(0, len(elementos)-1):
  if i > 0:
    if elementos[i] < elementos[i-1]:
      resultado = "desordenado"
      print(resultado)
resultado = "ordenado"
print(resultado)