Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.056 s | 7 KBi |
#2 |
Incorrecto
|
0.048 s | 7 KBi |
#3 |
Incorrecto
|
0.059 s | 7 KBi |
#4 |
Incorrecto
|
0.061 s | 7 KBi |
#5 |
Incorrecto
|
0.046 s | 7 KBi |
#6 |
Incorrecto
|
0.055 s | 7 KBi |
#7 |
Incorrecto
|
0.052 s | 7 KBi |
#8 |
Incorrecto
|
0.053 s | 7 KBi |
#9 |
Incorrecto
|
0.052 s | 7 KBi |
#10 |
Incorrecto
|
0.058 s | 7 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}`));