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

Envío 4516

Problema 0x9d - ¿Está ordenado?

  • Autor: debans
  • Fecha: 2021-07-11 04:28:10 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>
    if index < array.len():
AttributeError: 'list' object has no attribute 'len'
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 11, in <module>
    if index < array.len():
AttributeError: 'list' object has no attribute 'len'
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 11, in <module>
    if index < array.len():
AttributeError: 'list' object has no attribute 'len'
0.02 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 index < array.len():
AttributeError: 'list' object has no attribute 'len'
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>
    if index < array.len():
AttributeError: 'list' object has no attribute 'len'
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 11, in <module>
    if index < array.len():
AttributeError: 'list' object has no attribute 'len'
0.027 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 index < array.len():
AttributeError: 'list' object has no attribute 'len'
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 index < array.len():
AttributeError: 'list' object has no attribute 'len'
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 index < array.len():
AttributeError: 'list' object has no attribute 'len'
0.018 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 index < array.len():
AttributeError: 'list' object has no attribute 'len'
0.02 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 11, in <module>
    if index < array.len():
AttributeError: 'list' object has no attribute 'len'
0.021 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>
    if index < array.len():
AttributeError: 'list' object has no attribute 'len'
0.02 s 3 KBi
Puntos totales: 0 / 100

Código

##ESTA ORDENADO?

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

print(n)
print(array)
isOrdered = True

for index,value in enumerate(array):
    if index < array.len():
        if array[index] > array[index+1]:
            isOrdered = False


print( "Ordenado" if isOrdered else "Desordenado" )