
[JAVA] 백준 #1157 - 단어 공부
·
💡 Algorithm/백준
1157번: 단어 공부 알파벳 대소문자로 된 단어가 주어지면, 이 단어에서 가장 많이 사용된 알파벳이 무엇인지 알아내는 프로그램을 작성하시오. 단, 대문자와 소문자를 구분하지 않는다. www.acmicpc.net public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine().toUpperCase(); int[] strCount = new int[26]; //알파벳 개수를 저장할 배열 for(int i=0; i