ʕ ˙ɷ˙ ʔค

알고리즘/코딩테스트

[JS]프로그래머스 Lv.0 a와 b 출력하기

YJ_P 2023. 9. 6. 16:48

 

답안 

const readline = require('readline');
const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

let input = [];

rl.on('line', function (line) {
    input = line.split(' ');
}).on('close', function () {
    const a = Number(input[0]);
    const b = Number(input[1]);
    console.log(`a = ${a}`);
    console.log(`b = ${b}`);
});