[Python] 백준 10808번 : 알파벳 개수

2025. 3. 25. 18:16

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

 

 


def solution(input_str):
    alphabet_list = [0] * 26

    for char in input_str:
        index = ord(char) - ord('a')
        alphabet_list[index] += 1

    for i in range(len(alphabet_list)):
        print(alphabet_list[i], end=' ')

input_str = input()

solution(input_str)

BELATED ARTICLES

more