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

[๋ฐฑ์ค€][Node.js] 2338๋ฒˆ : ๊ธด์ž๋ฆฌ ๊ณ„์‚ฐ

by ๐Ÿ‡๋ฐ•๋ด‰๋ด‰๐Ÿ‡ 2021. 8. 1.

 

 

Algorithm

-  ๊ธด์ž๋ฆฌ ๊ณ„์‚ฐ -

 


 

๋ฌธ์ œ

๋‘ ์ˆ˜ A, B๋ฅผ ์ž…๋ ฅ๋ฐ›์•„, A+B, A-B, A×B๋ฅผ ๊ตฌํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜์‹œ์˜ค.

 

์ž…์ถœ๋ ฅ ์˜ˆ์‹œ

 

๋ฌธ์ œ ํ’€๊ธฐ

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 = input.map((el) => BigInt(el));
    let result = [];

result.push(input[0] + input[1]);
result.push(input[0] - input[1]);
result.push(input[0] * input[1]);

console.log(result.join("\n"));
	process.exit();
});

 

 

 

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€