https://www.acmicpc.net/problem/10808
정답 리스트의 크기를 알파벳의 개수인 26개로 두고, 참조하면서 각 알파벳에서 'a'를 뺀 만큼의 인덱스에 1씩 계속 더한다.
S = list(input()) alpha = [0 for _ in range(26)] for s in S: alpha[ord(s) - ord('a')] += 1 print(' '.join(list(map(str, alpha))))