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

Envío 4803

Problema 0x9d - ¿Está ordenado?

  • Autor: luis_alfredo
  • Fecha: 2021-08-21 00:46:28 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
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.04 s 6 KBi
#2
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.059 s 18 KBi
#3
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.045 s 6 KBi
#4
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.041 s 6 KBi
#5
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.055 s 6 KBi
#6
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.051 s 6 KBi
#7
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.039 s 6 KBi
#8
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.045 s 8 KBi
#9
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.042 s 7 KBi
#10
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.044 s 7 KBi
#11
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.041 s 6 KBi
#12
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:1
let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
        ^

ReferenceError: prompt is not defined
    at Object.<anonymous> (/box/script.js:1:9)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
0.042 s 6 KBi
Puntos totales: 0 / 100

Código

let n = prompt('Por favor, ingresa el numero de elementos del arreglo');
let i = 0;
let y = 0;
let h = 1;
let arr = [];
let elem;
while(i < n){
    let pos = i + 1;
    elem = prompt('Ingresa el numero que va en la posicion # ' + pos );
    elem = elem + ' ';
    arr.push(elem);
    i++
}

while(h < n){
    if(arr[y] < arr[y+1]){
        console.log('ordenado');
    } else {
        console.log('desordenado');
    }
    h++;
    y++;
}