728x90
https://softeer.ai/practice/6295
ํ๋ ์ํํฐ์ด Lv1. A+B js ํ์ด
์๋ฐ์คํฌ๋ฆฝํธ ์ฝํ ์ฝ์ง์๋ค
๊ทธ๋๋ ๊ฐ๋ฐ ์งฌ๋ฐ๋ก ์ด์ฐ์ด์ฐ ๊ทน๋ณตํ๋์ค..^-^
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
let sum = 0;
let result = [];
rl.on('line', input =>{
arr = input.split(' ').map(el=>parseInt(el));
if(arr.length >1) {
sum = arr[0] + arr[1];
result.push(sum);
}
})
rl.on('close', ()=>{
for(let i=0; i<result.length; ++i){
console.log("Case #"+(i+1)+":", result[i]);
}
})
728x90
'๐ ์๊ณ ๋ฆฌ์ฆ > Softeer' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Javascript(NodeJS)/Softeer] Lv1. ๊ทผ๋ฌด ์๊ฐ (0) | 2024.06.27 |
---|---|
[C++/Softeer] Lv3. ์์๋๋ก ๋ฐฉ๋ฌธํ๊ธฐ (HSAT 7ํ ์ ๊ธฐ ์ฝ๋ฉ ์ธ์ฆํ๊ฐ ๊ธฐ์ถ) (0) | 2024.06.27 |
[C++/Softeer] Lv2. ํ์์ค ์์ฝ (0) | 2024.06.27 |
[C++/Softeer] Lv1. ์ํํ ํจ๋ (0) | 2024.06.26 |
[C++/Softeer] Lv3. ํจ๊ปํ๋ ํจ๋ (0) | 2024.06.26 |