結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-14 17:58:02
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 420 bytes
コンパイル時間 2,099 ms
コンパイル使用メモリ 71,444 KB
実行使用メモリ 62,648 KB
最終ジャッジ日時 2023-10-11 12:43:35
合計ジャッジ時間 9,936 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 124 ms
56,096 KB
testcase_03 AC 122 ms
56,164 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 123 ms
56,072 KB
testcase_07 WA -
testcase_08 RE -
testcase_09 AC 123 ms
55,920 KB
testcase_10 AC 123 ms
55,864 KB
testcase_11 RE -
testcase_12 AC 125 ms
56,384 KB
testcase_13 AC 124 ms
55,596 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int n = sc.nextInt();
		int[] ar = new int[6];
		for (int i=0; i<n; i++) ar[sc.nextInt()-1]++;
		int max = Integer.MIN_VALUE;
		for (int i=0; i<n; i++) {
			max = Math.max(max, ar[i]);
		}
		for (int i=5; i>=0; i--) {
			if (ar[i] == max) {
				System.out.println(i+1); return;
			}
		}
		
	}
}
0