Algorithm
- 단어 길이 재기 -
문제
알파벳으로만 이루어진 단어를 입력받아, 그 길이를 출력하는 프로그램을 작성하시오.
입출력 예시
문제 풀기
const readline = require("readline");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
let input;
rl.on("line", function (line) {
input = line
.toString()
.trim();
}).on("close", function () {
console.log(input.length);
process.exit();
});
반응형
'개인공부 > Algorithm' 카테고리의 다른 글
[백준][Node.js] 2745번 : 진법 변환 (0) | 2021.09.16 |
---|---|
[백준][Node.js] 2744번 : 대소문자 바꾸기 (0) | 2021.09.15 |
[백준][Node.js] 2742번 : 기찍 N (0) | 2021.09.13 |
[백준][Node.js] 2741번 : N찍기 (0) | 2021.09.12 |
[백준][Node.js] 2740번 : 행렬 곱셈 (0) | 2021.09.11 |
댓글