結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー mits58mits58
提出日時 2016-05-14 13:08:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 469 ms / 5,000 ms
コード長 456 bytes
コンパイル時間 2,776 ms
コンパイル使用メモリ 71,656 KB
実行使用メモリ 60,664 KB
最終ジャッジ日時 2023-09-08 14:50:58
合計ジャッジ時間 9,963 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 205 ms
58,828 KB
testcase_01 AC 446 ms
60,196 KB
testcase_02 AC 125 ms
55,804 KB
testcase_03 AC 126 ms
55,812 KB
testcase_04 AC 130 ms
55,928 KB
testcase_05 AC 469 ms
60,664 KB
testcase_06 AC 122 ms
55,492 KB
testcase_07 AC 122 ms
55,912 KB
testcase_08 AC 123 ms
56,264 KB
testcase_09 AC 123 ms
55,972 KB
testcase_10 AC 126 ms
56,080 KB
testcase_11 AC 125 ms
56,008 KB
testcase_12 AC 123 ms
55,508 KB
testcase_13 AC 125 ms
55,800 KB
testcase_14 AC 376 ms
60,448 KB
testcase_15 AC 275 ms
60,248 KB
testcase_16 AC 407 ms
60,416 KB
testcase_17 AC 279 ms
60,556 KB
testcase_18 AC 396 ms
60,188 KB
testcase_19 AC 367 ms
60,344 KB
testcase_20 AC 442 ms
60,392 KB
testcase_21 AC 196 ms
58,184 KB
testcase_22 AC 321 ms
60,032 KB
testcase_23 AC 449 ms
60,208 KB
testcase_24 AC 451 ms
60,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	static long mod=(long)10E9;
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
        	int n=sc.nextInt();
        	int[] l=new int[6];
        	for(int i=0;i<n;i++) l[sc.nextInt()-1]++;
        	int res=0;
        	int max=0;
        	for(int i=0;i<6;i++) if(max<=l[i]){ res=i+1; max=l[i];}
        	System.out.println(res);
        }
    }
}
0