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

Envío 6942

Problema 0x9d - ¿Está ordenado?

  • Autor: Juanes2002
  • Fecha: 2023-03-17 01:14:21 UTC (Hace alrededor de 1 año)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#2
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#3
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#4
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#5
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#6
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#7
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#8
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#9
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#10
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#11
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
#12
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
N = int(input())
^
main.c:1:5: error: expected expression
N = int(input())
    ^
main.c:8:27: error: expected ';' after top level declarator
print(ordenado(N,arreglo))
                          ^
                          ;
1 warning and 2 errors generated.

                    
Puntos totales: 0 / 100

Código

N = int(input())
arreglo = [int(arreglo) for arreglo in input().split()]
def ordenado(N,arreglo): 
  for i in range(0,N-1): 
    if arreglo[i] > arreglo[i + 1]:
       return("desordenado")
  return("ordenado") 
print(ordenado(N,arreglo))