Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- 수학
- HackCTF
- 백준
- xcz.kr
- Web Hacking
- 구현
- MySQL
- cryptography
- CTF
- wargame
- Digital Forensics
- misc
- N0Named
- 인코그니토
- 정렬
- Web
- 그리디 알고리즘
- C
- Network
- Incognito
- Python
- Database
- 사칙연산
- Text
- 문자열
- php
- 써니나타스
- SuNiNaTas
- Forensics
- writeup
Archives
- Today
- Total
보안을 그리다, 훈이
[Baekjoon/Python3] 10808번 알파벳 개수 본문
[Baekjoon/Python3] 10808번 알파벳 개수
10808번: 알파벳 개수
단어에 포함되어 있는 a의 개수, b의 개수, …, z의 개수를 공백으로 구분해서 출력한다.
www.acmicpc.net
# chr(), ord()
alp = [chr(i) for i in range(97, 123)]
cnt = []
inp = input()
for i in alp:
print(inp.count(i), end=' ')
alp = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
cnt = []
inp = input()
for i in alp:
print(inp.count(i), end=' ')
'Programming > Python & Data Structures' 카테고리의 다른 글
[Baekjoon/Python3] 10813번 공 바꾸기 (0) | 2020.12.06 |
---|---|
[Baekjoon/Python3] 10809번 알파벳 찾기 (0) | 2020.12.06 |
[Baekjoon/Python3] 10801번 카드게임 (0) | 2020.12.06 |
[Baekjoon/Python3] 10797번 10부제 (0) | 2020.12.06 |
[Baekjoon/Python3] 10773번 제로 (0) | 2020.12.06 |
Comments