Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- Git
- 편스토랑 우승상품
- Kaggle
- AI 경진대회
- SW Expert Academy
- 프로그래머스
- 맥북
- Baekjoon
- Real or Not? NLP with Disaster Tweets
- leetcode
- programmers
- 데이콘
- 프로그래머스 파이썬
- PYTHON
- 금융문자분석경진대회
- ChatGPT
- dacon
- 자연어처리
- 캐치카페
- gs25
- 파이썬
- github
- 더현대서울 맛집
- 코로나19
- hackerrank
- 편스토랑
- Docker
- ubuntu
- 백준
- 우분투
Archives
- Today
- Total
목록
반응형
10987번 (1)
반응형
솜씨좋은장씨
[BaekJoon] 10987번 : 모음의 개수 (Python)
코딩 1일 1문제! 오늘의 문제는 백준의 모음의 개수입니다. 10987번: 모음의 개수 알파벳 소문자로만 이루어진 단어가 주어진다. 이때, 모음(a, e, i, o, u)의 개수를 출력하는 프로그램을 작성하시오. www.acmicpc.net Solution from collections import Counter def count_vowel(string): vowels = ['a', 'e', 'i', 'o', 'u'] cnt = Counter(string).items() vowel_cnt = [count[1] for count in cnt if count[0] in vowels] return sum(vowel_cnt) if __name__ == "__main__": string = input() prin..
Programming/코딩 1일 1문제
2021. 6. 26. 20:43
반응형