結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー jimanojimano
提出日時 2018-01-14 16:04:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 5,000 ms
コード長 702 bytes
コンパイル時間 3,968 ms
コンパイル使用メモリ 72,288 KB
実行使用メモリ 58,544 KB
最終ジャッジ日時 2023-09-08 15:19:48
合計ジャッジ時間 6,867 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
50,508 KB
testcase_01 AC 146 ms
57,908 KB
testcase_02 AC 44 ms
49,276 KB
testcase_03 AC 45 ms
49,440 KB
testcase_04 AC 45 ms
49,352 KB
testcase_05 AC 150 ms
58,496 KB
testcase_06 AC 44 ms
49,168 KB
testcase_07 AC 44 ms
49,176 KB
testcase_08 AC 43 ms
47,448 KB
testcase_09 AC 43 ms
49,260 KB
testcase_10 AC 44 ms
49,320 KB
testcase_11 AC 44 ms
49,128 KB
testcase_12 AC 44 ms
49,256 KB
testcase_13 AC 44 ms
49,240 KB
testcase_14 AC 117 ms
56,688 KB
testcase_15 AC 77 ms
54,500 KB
testcase_16 AC 137 ms
57,792 KB
testcase_17 AC 86 ms
54,420 KB
testcase_18 AC 135 ms
57,732 KB
testcase_19 AC 110 ms
56,436 KB
testcase_20 AC 149 ms
58,172 KB
testcase_21 AC 54 ms
50,452 KB
testcase_22 AC 91 ms
54,548 KB
testcase_23 AC 150 ms
55,812 KB
testcase_24 AC 152 ms
58,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No0082 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int N = Integer.parseInt(br.readLine());
			String[] L = br.readLine().split(" ");
			int[] level = new int[6];

			for (String s : L) {
				level[Integer.parseInt(s) - 1]++;
			}

			int max = 0;
			int maxCnt = 0;
			for (int i = 0; i < level.length; i++) {
				if (max <= level[i]) {
					max = level[i];
					maxCnt = i + 1;
				}
			}
			System.out.println(maxCnt);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0