Skip to content

Commit

Permalink
B_10808
Browse files Browse the repository at this point in the history
  • Loading branch information
likppi10 committed Oct 26, 2021
1 parent 532478b commit 9225e47
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Algorithm_Baek/Basic/B_203/B_10808_알파벳개수.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package B_203_자료구조1참고;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class B_10808_알파벳개수 {

public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();

String word = br.readLine();
int[] al = new int[26];
char[] w = word.toCharArray();

for(int i=0; i<w.length; i++) al[w[i]-'a']++;
for(int i=0; i<al.length; i++) sb.append(al[i]+" ");

System.out.println(sb);
}
}

0 comments on commit 9225e47

Please sign in to comment.