結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー 37zigen37zigen
提出日時 2016-03-12 20:36:15
言語 Java19
(openjdk 21)
結果
AC  
実行時間 480 ms / 5,000 ms
コード長 600 bytes
コンパイル時間 3,407 ms
コンパイル使用メモリ 73,652 KB
実行使用メモリ 61,156 KB
最終ジャッジ日時 2023-09-08 14:48:05
合計ジャッジ時間 11,660 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 221 ms
60,032 KB
testcase_01 AC 465 ms
60,868 KB
testcase_02 AC 138 ms
56,624 KB
testcase_03 AC 139 ms
56,192 KB
testcase_04 AC 142 ms
55,840 KB
testcase_05 AC 480 ms
60,760 KB
testcase_06 AC 138 ms
55,716 KB
testcase_07 AC 141 ms
56,176 KB
testcase_08 AC 137 ms
55,964 KB
testcase_09 AC 139 ms
56,112 KB
testcase_10 AC 141 ms
56,188 KB
testcase_11 AC 137 ms
56,220 KB
testcase_12 AC 135 ms
54,060 KB
testcase_13 AC 141 ms
56,176 KB
testcase_14 AC 397 ms
61,032 KB
testcase_15 AC 320 ms
60,712 KB
testcase_16 AC 432 ms
60,884 KB
testcase_17 AC 303 ms
60,328 KB
testcase_18 AC 416 ms
60,944 KB
testcase_19 AC 386 ms
60,252 KB
testcase_20 AC 461 ms
61,156 KB
testcase_21 AC 209 ms
59,760 KB
testcase_22 AC 341 ms
60,568 KB
testcase_23 AC 461 ms
60,804 KB
testcase_24 AC 465 ms
60,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package 練習;
import java.util.Arrays;
import java.util.Date;
import java.util.Scanner;
public class main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		long exec_time=new Date().getTime();
		int n=sc.nextInt();
		int[] List=new int[n];
		int[] Level=new int[6];
		Arrays.fill(Level, 0);
		for(int i=0;i<n;i++){
			int a=sc.nextInt();
			Level[a-1]++;
		}
		int max=0;
		int flag=0;
		for(int i=0;i<6;i++){
			if(max<=Level[i]){
				max=Level[i];
				flag=i+1;	
			}
		}
		System.out.println(flag);
		System.err.println(new Date().getTime()-exec_time+"ms");
	}
}

0