728x90
const fs = require('fs');
const input = fs.readFileSync("/dev/stdin").toString().trim().split("\n");
function getVowelCount(str) {
const matches = str.match(/[aeiou]/gi);
return matches ? matches.length : 0;
}
for(let i = 0; i < input.length-1; i++) {
console.log(getVowelCount(input[i]))
}
728x90
'Development > 코딩테스트' 카테고리의 다른 글
[백준] 14623 Node (0) | 2022.09.20 |
---|---|
[백준] 2480 Node.js (0) | 2022.09.20 |
[백준] 2338 Node.js (0) | 2022.09.20 |
[백준] 10797 Node.js (0) | 2022.09.19 |
[백준] 1271 Node.js (0) | 2022.09.19 |
댓글