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

Envío 4865

Problema 0x9d - ¿Está ordenado?

  • Autor: valenvila00
  • Fecha: 2021-09-07 03:33:03 UTC (Hace más de 2 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>
    length = int(input())
ValueError: invalid literal for int() with base 10: '1 2 3 4 5'
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 11, in <module>
    length = int(input())
ValueError: invalid literal for int() with base 10: '5 4 3 2 1'
0.02 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>
    length = int(input())
ValueError: invalid literal for int() with base 10: '0 3 2 2 1 5 4 5 0 1'
0.023 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>
    length = int(input())
ValueError: invalid literal for int() with base 10: '3 2 4 1 2 1 3 3 5 5'
0.02 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>
    length = int(input())
ValueError: invalid literal for int() with base 10: '4 5 5 2 1 3 5 3 1 1'
0.026 s 7 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>
    length = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 3 3 5 5 5'
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 11, in <module>
    length = int(input())
ValueError: invalid literal for int() with base 10: '1 2 3 3 3 4 4 4 4 4'
0.031 s 6 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>
    length = int(input())
ValueError: invalid literal for int() with base 10: '0 0 0 1 1 1 1 2 2 2'
0.021 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>
    length = int(input())
ValueError: invalid literal for int() with base 10: '-916271954 661059257 478664722 132338074 -171124553 878438626 37584288 874853458 -694283744 -21744796 -700662750 -861991287 -591400379 -451392421 -387170014 -295248241 -377342369 -680531262 -62249692
0.024 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>
    length = int(input())
ValueError: invalid literal for int() with base 10: '-86818186 -22114447 831023189 -64267162 -140674830 -678549552 884229599 -555575498 546506748 -286912325 783146620 277832786 -240690560 612629301 131515661 -651513885 561987230 -728648016 474828400 59
0.029 s 7 KBi
#11
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 11, in <module>
    length = int(input())
ValueError: invalid literal for int() with base 10: '-993240437 -956108105 -947143004 -924388464 -922795073 -910202929 -903166164 -860705528 -851690159 -838049471 -829271580 -828211977 -807764920 -805927626 -773587911 -681639938 -639848423 -624989360 -
0.035 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 11, in <module>
    length = int(input())
ValueError: invalid literal for int() with base 10: '-994371375 -988005287 -974423316 -929392851 -922095902 -906209363 -896430915 -894871356 -865943219 -862590063 -860079344 -832004825 -813676920 -792632052 -777526153 -774910874 -764477295 -711179851 -
0.021 s 3 KBi
Puntos totales: 0 / 100

Código

def is_sorted(arr, length):
    for n in len(arr):
        if arr[n] <= arr[n+1]:
            continue
        else:
            return "Desordenado"
    return "Ordenado"

if __name__ == "__main__":
    arr = list(map(int, input().split(" ")))
    length = int(input())
    is_sorted(arr,length)