728x90
https://www.acmicpc.net/problem/18409
18409번: 母音を数える (Counting Vowels)
長さ N の英小文字からなる文字列 S が与えられる.S のうち母音字の個数,つまり a,i,u,e,o の個数の総和を求めよ.
www.acmicpc.net
예제 입력 1
8
joiyosen
예제 출력 1
4
예제 입력 2
6
bitaro
예제 출력 2
3
Sol - 모음개수 출력
int(input())
cnt = 0
for i in input():
if i in ['a','e','i','o','u']:
cnt += 1
print(cnt)
'Baekjoon Algorithm > python' 카테고리의 다른 글
[Python]BAEKJOON 2606번 바이러스 (dfs, bfs) (1) | 2023.10.01 |
---|---|
[Python]BAEKJOON 11055번 (0) | 2023.03.15 |
[Python]BAEKJOON 14002번 가장 긴 증가하는 부분 수열 4 (0) | 2023.03.14 |
[Python]BAEKJOON 10816번 숫자카드 2 (2) | 2023.03.06 |
[Python]BAEKJOON 10815번 숫자카드 (0) | 2023.03.06 |
댓글