結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー soujiki
提出日時 2015-04-29 20:28:07
言語 Java
(openjdk 23)
結果
AC  
実行時間 583 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 3,636 ms
コンパイル使用メモリ 78,200 KB
実行使用メモリ 59,260 KB
最終ジャッジ日時 2024-06-26 07:33:11
合計ジャッジ時間 11,854 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

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