Study 20개의 0~9까지의 숫자를 입력받아, 최대빈도수와 빈도수 구하기 bslime 2008. 5. 31. 01:07 import java.io.*; class Bindo { public static void main(String args[]) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int num; int count[] = new int[10]; String input; for(int i=0;i<20; i++) { input = in.readLine(); num = Integer.parseInt(input); count[num] ++; } int max = -1; for(int i=0;i<10;i++) { if(count[i]>=max) max=i; } System.out.println("가장 빈도수가 많은 수는 " + max + " 빈도수 " + count[max]); } }