{"id":466,"date":"2019-02-09T22:45:07","date_gmt":"2019-02-09T13:45:07","guid":{"rendered":"http:\/\/www.mukgee.com\/?p=466"},"modified":"2020-12-27T01:24:31","modified_gmt":"2020-12-26T16:24:31","slug":"%ec%95%8c%ea%b3%a0%eb%a6%ac%ec%a6%98%ec%b5%9c%eb%b9%88%ea%b0%92-%ea%b5%ac%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/mukgee.com\/?p=466","title":{"rendered":"[\uc54c\uace0\ub9ac\uc998]\ucd5c\ube48\uac12 \uad6c\ud558\uae30"},"content":{"rendered":"\n<p>\ucd5c\ube48\uac12\uc744 \uad6c\ud558\ub294 \uc54c\uace0\ub9ac\uc998<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import java.util.Scanner;\n \nclass Solution{\n    public static void main(String args[]){\n        Scanner sc = new Scanner(System.in);\n        String input1 = sc.nextLine();\n        int tc = Integer.parseInt(input1);\n        Solution sol = new Solution();\n        for(int inx = 0 ; inx &lt; tc; inx++){\n            String input2 = sc.nextLine();\n            String input_score = sc.nextLine();\n            String[] student_score = input_score.split(\" \");\n            String result = sol.getModeValue(student_score);\n            System.out.println(\"#\"+ input2+ \" \"+result);\n        } \n         \n    }\n    public String getModeValue(String[] input){ \n        int[] array = new int[1000];\n         \n        for(int inx = 0 ; inx &lt; input.length ; inx++){\n            int num = Integer.parseInt(input[inx]);\n            array[num] = array[num]+1;\n        }\n \n        int modeValue = 0;\n        int count = 0;\n        for(int inx = 0 ; inx &lt; array.length ; inx++){\n            if(array[inx] &gt;= count &amp;&amp; inx &gt; modeValue){\n                modeValue = inx;\n                count = array[inx];\n            }\n        }\n        return String.valueOf(modeValue);\n    }\n}<\/code><\/pre>\n\n\n\n<p><a href=\"https:\/\/www.swexpertacademy.com\/main\/learn\/course\/lectureProblemViewer.do#none\">\ucd9c\ucc98 : https:\/\/www.swexpertacademy.com\/main\/learn\/course\/lectureProblemViewer.do#none<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ucd5c\ube48\uac12\uc744 \uad6c\ud558\ub294 \uc54c\uace0\ub9ac\uc998 \ucd9c\ucc98 : https:\/\/www.swexpertacademy.com\/main\/learn\/course\/lectureProblemViewer.do#none<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[3],"tags":[53],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/posts\/466"}],"collection":[{"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mukgee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=466"}],"version-history":[{"count":1,"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/posts\/466\/revisions"}],"predecessor-version":[{"id":614,"href":"http:\/\/mukgee.com\/index.php?rest_route=\/wp\/v2\/posts\/466\/revisions\/614"}],"wp:attachment":[{"href":"http:\/\/mukgee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mukgee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=466"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mukgee.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}