TOPIC
Onde está o erro? Passa no uDebug meu código.
hgusan asked 2 years ago
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var lines = input.split('\n');
let inInterval = 0;
let outInterval = 0;
for (let i = 1; i < lines.length; i++) {
if (lines[i] >= 10 && lines[i] <= 20) {
inInterval++;
} else {
outInterval++;
}
}
console.log(`${inInterval} in`);
console.log(`${outInterval} out`);
This topic has not been answered yet. Be the first!