結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー rf141
提出日時 2015-08-10 21:33:04
言語 Java
(openjdk 23)
結果
AC  
実行時間 560 ms / 5,000 ms
コード長 493 bytes
コンパイル時間 3,217 ms
コンパイル使用メモリ 74,628 KB
実行使用メモリ 48,208 KB
最終ジャッジ日時 2024-06-26 07:41:47
合計ジャッジ時間 11,473 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

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