結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-20 16:20:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 442 ms / 5,000 ms
コード長 501 bytes
コンパイル時間 2,668 ms
コンパイル使用メモリ 71,728 KB
実行使用メモリ 60,612 KB
最終ジャッジ日時 2023-09-08 15:11:45
合計ジャッジ時間 10,632 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 199 ms
58,948 KB
testcase_01 AC 424 ms
60,132 KB
testcase_02 AC 123 ms
56,248 KB
testcase_03 AC 121 ms
55,880 KB
testcase_04 AC 127 ms
55,892 KB
testcase_05 AC 438 ms
60,576 KB
testcase_06 AC 123 ms
55,832 KB
testcase_07 AC 120 ms
55,732 KB
testcase_08 AC 122 ms
56,132 KB
testcase_09 AC 121 ms
55,892 KB
testcase_10 AC 120 ms
56,284 KB
testcase_11 AC 120 ms
55,744 KB
testcase_12 AC 121 ms
56,044 KB
testcase_13 AC 120 ms
55,828 KB
testcase_14 AC 365 ms
60,028 KB
testcase_15 AC 282 ms
60,156 KB
testcase_16 AC 404 ms
60,612 KB
testcase_17 AC 268 ms
60,052 KB
testcase_18 AC 389 ms
60,432 KB
testcase_19 AC 358 ms
60,296 KB
testcase_20 AC 438 ms
60,264 KB
testcase_21 AC 199 ms
58,536 KB
testcase_22 AC 309 ms
60,296 KB
testcase_23 AC 426 ms
60,296 KB
testcase_24 AC 442 ms
60,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int[] level = new int[7];
    for(int i = 0; i < N; i++) {
      level[sc.nextInt()]++;
    }
    int max = 0;
    for(int i = 0; i < 7; i++) {
      max = Math.max(max, level[i]);
    }
    int ans = 0;
    for(int i = 6; i >= 0; i--) {
      if(level[i] == max) {
        ans = i;
        break;
      }
    }
    System.out.println(ans);
  }
}
0