728x90
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(bf.readLine());
int[] arr = new int[26];
String str = st.nextToken();
for (int i = 0; i < str.length(); i++) {
arr[str.charAt(i) - 'a']++;
}
for (int i : arr) {
System.out.print(i + " ");
}
}
}
728x90
반응형
'Algorithm > 백준' 카테고리의 다른 글
[알고리즘] 백준 2566 JAVA (0) | 2023.03.28 |
---|---|
[알고리즘] 백준 2738 JAVA (0) | 2023.03.28 |
[알고리즘] 백준 1267 JAVA (0) | 2022.12.20 |
[알고리즘] 백준 10093 JAVA (1) | 2022.12.19 |
[알고리즘] 백준 2309 JAVA (0) | 2022.12.18 |