結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー nCk_cvnCk_cv
提出日時 2016-02-01 19:48:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 466 ms / 5,000 ms
コード長 420 bytes
コンパイル時間 2,561 ms
コンパイル使用メモリ 71,340 KB
実行使用メモリ 60,768 KB
最終ジャッジ日時 2023-09-08 14:43:14
合計ジャッジ時間 10,834 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 212 ms
58,760 KB
testcase_01 AC 436 ms
60,128 KB
testcase_02 AC 122 ms
55,896 KB
testcase_03 AC 122 ms
56,428 KB
testcase_04 AC 122 ms
55,716 KB
testcase_05 AC 466 ms
60,768 KB
testcase_06 AC 122 ms
56,036 KB
testcase_07 AC 121 ms
55,728 KB
testcase_08 AC 130 ms
55,740 KB
testcase_09 AC 122 ms
53,744 KB
testcase_10 AC 123 ms
56,128 KB
testcase_11 AC 132 ms
55,764 KB
testcase_12 AC 120 ms
55,784 KB
testcase_13 AC 123 ms
55,712 KB
testcase_14 AC 368 ms
58,052 KB
testcase_15 AC 268 ms
60,296 KB
testcase_16 AC 396 ms
60,348 KB
testcase_17 AC 290 ms
59,916 KB
testcase_18 AC 412 ms
60,752 KB
testcase_19 AC 348 ms
60,352 KB
testcase_20 AC 450 ms
60,644 KB
testcase_21 AC 190 ms
58,512 KB
testcase_22 AC 324 ms
60,348 KB
testcase_23 AC 453 ms
60,112 KB
testcase_24 AC 425 ms
60,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.io.*;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] l = new int[6];
		int n = sc.nextInt();
		for(int i = 0; i < n; i++) {
			l[sc.nextInt()-1]++;
		}
		int MAX = 0;
		int id = 5;
		for(int i = 0; i < 6; i++) {
			if(MAX <= l[i]) {
				MAX = l[i];
				id = i;
			}
		}
		System.out.println((id+1));
	}
}
0