๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

ํ”„์—” ๊ณต๋ถ€/๐Ÿซง ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๊ณต๋ถ€

[๋ฐฑ์ค€/Node.js] 15552๋ฒˆ ํ’€์ด || JavaScript

728x90
let input = require('fs').readFileSync('/dev/stdin').toString().split("\n");
const loop = +input[0];
let numArray = "";

for (i = 1; i <= loop; i++) {
    let numbers = input[i].split(" ").map(Number);
    numArray +=numbers[0] + numbers[1] + "\n";
}
console.log(numArray);

๐ŸŽ€ ๋น ๋ฅธ ์‹œ๊ฐ„ ์ถœ๋ ฅ์ด๋ผ์„œ ์ถœ๋ ฅ์ด ์—ฌ๋Ÿฌ๋ฒˆ ๋‚˜์˜ค๋ฉด ์‹œ๊ฐ„ ์ดˆ๊ณผ๊ฐ€ ๋‚˜์˜จ๋‹ค. 

ํ•œ๋ฒˆ์— ๋ฌธ์ž์—ด๋กœ ๋ฐ›์€ ํ›„, "\n" ์œผ๋กœ ํ•œ ์ค„์”ฉ ๋‚˜๋ˆ ์„œ ํ•œ๋ฒˆ์— ์ถœ๋ ฅํ•˜๋Š” ๊ฒƒ์ด ํฌ์ธํŠธ

 

728x90
๋ฐ˜์‘ํ˜•