結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-11 05:36:18
言語 Java19
(openjdk 21)
結果
AC  
実行時間 453 ms / 5,000 ms
コード長 611 bytes
コンパイル時間 1,881 ms
コンパイル使用メモリ 72,284 KB
実行使用メモリ 60,764 KB
最終ジャッジ日時 2023-09-08 15:01:52
合計ジャッジ時間 9,547 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 199 ms
59,040 KB
testcase_01 AC 453 ms
60,680 KB
testcase_02 AC 122 ms
55,704 KB
testcase_03 AC 125 ms
55,960 KB
testcase_04 AC 122 ms
53,964 KB
testcase_05 AC 450 ms
60,764 KB
testcase_06 AC 117 ms
55,848 KB
testcase_07 AC 120 ms
56,096 KB
testcase_08 AC 124 ms
55,708 KB
testcase_09 AC 120 ms
55,840 KB
testcase_10 AC 119 ms
56,076 KB
testcase_11 AC 122 ms
55,996 KB
testcase_12 AC 120 ms
55,804 KB
testcase_13 AC 119 ms
55,848 KB
testcase_14 AC 379 ms
60,436 KB
testcase_15 AC 284 ms
60,256 KB
testcase_16 AC 414 ms
60,528 KB
testcase_17 AC 268 ms
59,968 KB
testcase_18 AC 405 ms
60,436 KB
testcase_19 AC 357 ms
60,296 KB
testcase_20 AC 438 ms
60,528 KB
testcase_21 AC 190 ms
58,276 KB
testcase_22 AC 306 ms
60,260 KB
testcase_23 AC 430 ms
60,112 KB
testcase_24 AC 427 ms
59,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int [] L = new int [N];
        int [] P = new int [6];
        for(int i=0; i<N; i++){
            L[i] = sc.nextInt();
            P[L[i]-1]+=1;
        }
        int max = 0;
        for(int j=0; j<6; j++){
            if(max<P[j]){
                max=P[j];
            }
        }
        for(int j=0; j<6; j++){
            if(max==P[5-j]){
                System.out.println(6-j);
                break;
            }
        }
    }
}
0