結果

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

ソースコード

diff #
raw source code

import java.util.*;

public class Yukicoder_79{
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int[] judg = new int[7];
		for(int i=0;i<N;i++){
			int x = stdIn.nextInt();
			judg[x]++;
		}
		int count = 0;
		int num = 0;
		for(int i=1;i<7;i++){
			if(count<=judg[i]){
				count = judg[i];
				num = i;
			}
		}
		System.out.println(num);
	}
}
0