結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー TatsuDXTatsuDX
提出日時 2016-09-08 23:44:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 451 ms / 5,000 ms
コード長 387 bytes
コンパイル時間 4,523 ms
コンパイル使用メモリ 72,728 KB
実行使用メモリ 60,968 KB
最終ジャッジ日時 2023-09-08 14:59:20
合計ジャッジ時間 11,513 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 198 ms
58,988 KB
testcase_01 AC 429 ms
59,952 KB
testcase_02 AC 127 ms
55,672 KB
testcase_03 AC 128 ms
55,748 KB
testcase_04 AC 124 ms
55,960 KB
testcase_05 AC 451 ms
60,968 KB
testcase_06 AC 120 ms
55,632 KB
testcase_07 AC 119 ms
55,740 KB
testcase_08 AC 120 ms
55,684 KB
testcase_09 AC 120 ms
55,892 KB
testcase_10 AC 119 ms
55,692 KB
testcase_11 AC 120 ms
56,056 KB
testcase_12 AC 120 ms
56,584 KB
testcase_13 AC 121 ms
55,984 KB
testcase_14 AC 387 ms
60,436 KB
testcase_15 AC 281 ms
60,016 KB
testcase_16 AC 403 ms
60,844 KB
testcase_17 AC 271 ms
59,956 KB
testcase_18 AC 386 ms
60,336 KB
testcase_19 AC 359 ms
60,072 KB
testcase_20 AC 422 ms
60,508 KB
testcase_21 AC 191 ms
58,276 KB
testcase_22 AC 310 ms
58,568 KB
testcase_23 AC 412 ms
60,012 KB
testcase_24 AC 429 ms
60,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt(), max = 0, t;
		int[] m = new int[7];
		for(int i = 0; i < n; i++){
			t = sc.nextInt();
			m[t]++;
			max = Math.max(max, m[t]);
		}
		for(int i = 6; i > 0; i--){
			if(m[i] == max){
				System.out.println(i);
				return;
			}
		}
	}
}
0