Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.044 s | 7 KBi |
#2 |
Correcto
|
0.054 s | 7 KBi |
#3 |
Correcto
|
0.039 s | 7 KBi |
#4 |
Correcto
|
0.037 s | 7 KBi |
#5 |
Correcto
|
0.05 s | 9 KBi |
#6 |
Incorrecto
|
0.041 s | 7 KBi |
#7 |
Incorrecto
|
0.039 s | 7 KBi |
#8 |
Incorrecto
|
0.034 s | 6 KBi |
#9 |
Correcto
|
0.037 s | 6 KBi |
#10 |
Correcto
|
0.052 s | 7 KBi |
#11 |
Incorrecto
|
0.052 s | 7 KBi |
#12 |
Incorrecto
|
0.044 s | 7 KBi |
const rl = require('readline').createInterface({ input: process.stdin, output: process.stdout }); rl.question('', (answer1) => { rl.question('', (answer2) => { elements = answer1 array = answer2.split(" ") sorted = true for (var i = 0; i < elements; i++) { if(array[i] >= array[i + 1]) { sorted = false break } } if(sorted) { console.log('Ordenado') }else{ console.log('Desordenado') } rl.close(); }); });