1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| var readline = require('readline'); var rl = readline.createInterface({ input: process.stdin });
var lines = [];
rl.on('line', function (line){ lines.push(line); })
rl.on('close', function() { slove(lines); })
function slove(lines) { console.log(lines) console.log(typeof(lines)) console.log(lines.split(' ')); console.log('-----------')
for(let i=0; i<lines.length; i++) {
let temp = lines[i].split(' ') let a = Number(temp[0]) let b = Number(temp[1])
if (a === b) { console.log(true) } else { console.log(false) } } }
|