Algorithm
- ์ฃผ์ฌ์ -
๋ฌธ์
์ค๋์ ๊ฐ์๊ธฐ ์ฃผ์ฌ์๋ฅผ ๋์ง๊ณ ์ถ๋ค.
๊ทธ๋ฐ๋ฐ ์ฝ๋ฉ๋ ํ๊ณ ์ถ๋ค.
๊ทธ๋ผ ๊ฐ์ดํ ๊น?
์ ์ถ๋ ฅ ์์
๋ฌธ์ ํ๊ธฐ
const readline = require("readline");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
let input = [];
rl.on("line", function (line) {
input.push(line.toString());
}).on("close", function () {
input.shift();
input = input.map((el) => el.split(" ").map((el) => Number(el)));
for (let i = 0; i < input.length; i++) {
console.log(`Case ${i + 1}: ${input[i][0] + input[i][1]}`);
}
process.exit();
});
๋ฐ์ํ
'๊ฐ์ธ๊ณต๋ถ > Algorithm' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค][Node.js] 9375๋ฒ : ํจ์ ์ ์ ํด๋น (0) | 2021.12.24 |
---|---|
[๋ฐฑ์ค][Node.js] 9325๋ฒ : ์ผ๋ง? (0) | 2021.12.23 |
[๋ฐฑ์ค][Node.js] 9095๋ฒ : 1, 2, 3 ๋ํ๊ธฐ (0) | 2021.12.21 |
[๋ฐฑ์ค][Node.js] 9093๋ฒ : ๋จ์ด ๋ค์ง๊ธฐ (0) | 2021.12.21 |
[๋ฐฑ์ค][Node.js] 9086๋ฒ : ๋ฌธ์์ด (0) | 2021.12.19 |
๋๊ธ