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

Envío 3903

Problema 0x9d - ¿Está ordenado?

  • Autor: vander idme
  • Fecha: 2021-04-21 00:57:23 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.02 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.024 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.024 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.028 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.018 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.017 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.031 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.02 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.02 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.026 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.031 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 1, in <module>
    a = [int(x) for x in array.split()]
NameError: name 'array' is not defined
0.024 s 3 KBi
Puntos totales: 0 / 100

Código

a = [int(x) for x in array.split()]
n = int(n)

flag = 0

for x in range(0, n - 1):
    if a[x] < a[x+1]:
        flag = 0
    else:
        flag = 1
        print('Desordenado')
        break


if flag == 0:
    print('Ordenado')