본문 바로가기
python-algorithm

백준 10203 Count Vowels

by 무적김두칠 2023. 1. 7.

https://www.acmicpc.net/problem/10203

 

10203번: Count Vowels

Gru has been trying to teach the minions English (they are born knowing only Minionese, which Lucy can’t stand). He is currently stuck trying to teach them the difference between vowels and consonants, which the minions are always confused about, especia

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
10
11
12
def sol(s):
    answer = s.count('a'+ s.count('e'+ s.count('i'+ s.count('o'+ s.count('u')
 
    return answer
 
 
if __name__ == '__main__':
    n = int(input())
    for _ in range(n):
        s = input()
        print('The number of vowels in %s is %d.' % (s, sol(s)))
 
cs
반응형

댓글