Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.088 s | 34 KBi |
#2 |
Incorrecto
|
0.094 s | 29 KBi |
#3 |
Incorrecto
|
0.059 s | 7 KBi |
#4 |
Incorrecto
|
0.047 s | 7 KBi |
#5 |
Incorrecto
|
0.049 s | 7 KBi |
#6 |
Incorrecto
|
0.068 s | 19 KBi |
#7 |
Incorrecto
|
0.066 s | 21 KBi |
#8 |
Incorrecto
|
0.053 s | 7 KBi |
#9 |
Incorrecto
|
0.061 s | 7 KBi |
#10 |
Incorrecto
|
0.078 s | 12 KBi |
const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }) function countElementsGreaterThan(arr, input) { return arr.filter(el => Number(el) > Number(input)).length } let lineNumber = 0; let arr = []; let results = []; rl.on("line", line => { ++lineNumber; if (lineNumber === 2) { arr = [...line.split(' ')] } if (lineNumber > 3) { results.push( countElementsGreaterThan(arr,Number(line)) ); } }) results.forEach(el => console.log(el));