티스토리 뷰
이미지를 클릭하면 해당 사이트에 갈 수 있습니다.
나의 풀이
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
let input = [];
let result = '';
>
rl.on('line', function (line) {
input = line.split(' ');
}).on('close', function () {
str = input[0];
n = Number(input[1]);
for (let i = 0; i < n; i++) {
result += str;
}
console.log(result);
});'프로그래머스-0LV' 카테고리의 다른 글
| 프로그래머스-0LV-JS-원소들의 곱과 합 (1) | 2024.01.22 |
|---|---|
| 프로그래머스-0LV-JS-홀짝에 따라 다른 값 반환하기 (0) | 2024.01.22 |
| 프로그래머스-0.LV-JS-접두사인지 확인하기 (0) | 2024.01.22 |
| 프로그래머스-0LV-JS-문자열 겹쳐쓰기 (0) | 2024.01.22 |
| 프로그래머스-0LV-JS-수 조작하기1 (0) | 2024.01.22 |

