結果

問題 No.79 過小評価ダメ・ゼッタイ
コンテスト
ユーザー rf141
提出日時 2015-08-10 21:33:04
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 307 ms / 5,000 ms
コード長 493 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,487 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 52,708 KB
最終ジャッジ日時 2026-03-12 23:40:30
合計ジャッジ時間 7,021 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.util.*;
public class Evaluation{
    public static void main(String... args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int[] counts = new int[6];
        for(int i = 0; i < N; i++){
            counts[scan.nextInt() - 1]++;
        }
        int max = 0;
        for(int i = 0; i < 6; i++){
            if(counts[max] <= counts[i]){
                max = i;
            }
        }   
        System.out.println(max + 1);      
    }
}
0