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();
});
๋ฐ์ํ
'๊ฐ์ธ๊ณต๋ถ > Algorithm' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค][Node.js] 2420๋ฒ : ์ฌํ๋ฆฌ์๋ (0) | 2021.08.02 |
---|---|
[๋ฐฑ์ค][Node.js] 2355๋ฒ : ์๊ทธ๋ง (0) | 2021.08.01 |
[๋ฐฑ์ค][Node.js] 2292๋ฒ : ๋ฒ์ง (0) | 2021.07.30 |
[๋ฐฑ์ค][Node.js] 2178๋ฒ : ๋ฏธ๋ก ํ์ (0) | 2021.07.29 |
[๋ฐฑ์ค][Node.js] 2167๋ฒ : 2์ฐจ์ ๋ฐฐ์ด์ ํฉ (0) | 2021.07.28 |
๋๊ธ