@@ -0,0 +1,1191 @@
+package boj_13300;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.InputStreamReader;%0Aimport java.util.StringTokenizer;%0A%0A/**%0A * %EB%B0%B1%EC%A4%80 %EC%98%A8%EB%9D%BC%EC%9D%B8 %EC%A0%80%EC%A7%80 13300%EB%B2%88 (%EB%B0%A9 %EB%B0%B0%EC%A0%95) %EB%AC%B8%EC%A0%9C%ED%92%80%EC%9D%B4%0A *%0A * @see https://www.acmicpc.net/problem/13300%0A * @author devetude%0A */%0Apublic class Main %7B%0A%09// %EA%B3%B5%EB%B0%B1 %EB%AC%B8%EC%9E%90%EC%97%B4 %EC%83%81%EC%88%98%0A%09private static final String SPACE = %22 %22;%0A%0A%09public static void main(String args%5B%5D) throws Exception %7B%0A%09%09// %EB%B2%84%ED%8D%BC%EB%A5%BC %ED%86%B5%ED%95%B4 %EC%9E%85%EB%A0%A5 %EA%B0%92%EC%9D%84 %EB%B0%9B%EC%9D%8C%0A%09%09BufferedReader br = new BufferedReader(new InputStreamReader(System.in));%0A%09%09StringTokenizer st = new StringTokenizer(br.readLine(), SPACE);%0A%09%09int N = Integer.parseInt(st.nextToken());%0A%09%09int K = Integer.parseInt(st.nextToken());%0A%0A%09%09// %EC%A0%95%EB%B3%B4 %EC%A0%80%EC%9E%A5 %EB%B0%B0%EC%97%B4 %EC%B4%88%EA%B8%B0%ED%99%94 (%5B%ED%95%99%EB%85%84%5D%5B%EC%84%B1%EB%B3%84%5D)%0A%09%09int%5B%5D%5B%5D classes = new int%5B7%5D%5B2%5D;%0A%0A%09%09while (N-- %3E 0) %7B%0A%09%09%09st = new StringTokenizer(br.readLine(), SPACE);%0A%09%09%09int S = Integer.parseInt(st.nextToken());%0A%09%09%09int Y = Integer.parseInt(st.nextToken());%0A%0A%09%09%09classes%5BY%5D%5BS%5D++;%0A%09%09%7D%0A%0A%09%09br.close();%0A%0A%09%09// %EC%B4%9D %EB%B0%A9%EC%9D%98 %EC%88%98%EB%A5%BC %EC%A0%80%EC%9E%A5 %ED%95%A0 %EB%B3%80%EC%88%98 %EC%B4%88%EA%B8%B0%ED%99%94%0A%09%09int totalRoomCnt = 0;%0A%0A%09%09// %ED%95%84%EC%9A%94%ED%95%9C %EB%B0%A9%EC%9D%98 %EC%88%98%EB%A5%BC %EA%B5%AC%ED%95%A8%0A%09%09for (int%5B%5D c : classes) %7B%0A%09%09%09for (int sex = 0; sex %3C 2; sex++) %7B%0A%09%09%09%09int roomCnt = c%5Bsex%5D / K;%0A%0A%09%09%09%09if (c%5Bsex%5D %25 K %3E 0) %7B%0A%09%09%09%09%09roomCnt++;%0A%09%09%09%09%7D%0A%0A%09%09%09%09totalRoomCnt += roomCnt;%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09// %EA%B2%B0%EA%B3%BC %EA%B0%92 %EC%B6%9C%EB%A0%A5%0A%09%09System.out.println(totalRoomCnt);%0A%09%7D%0A%7D

add problem 13300