๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ์ธ๊ณต๋ถ€/Algorithm

[๋ฐฑ์ค€][Node.js] 9295๋ฒˆ : ์ฃผ์‚ฌ์œ„

by ๐Ÿ‡๋ฐ•๋ด‰๋ด‰๐Ÿ‡ 2021. 12. 22.

 

 

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();
});

 

 

 

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€