結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー ぴろず
提出日時 2014-12-05 11:30:33
言語 Java
(openjdk 23)
結果
AC  
実行時間 562 ms / 5,000 ms
コード長 417 bytes
コンパイル時間 2,205 ms
コンパイル使用メモリ 74,584 KB
実行使用メモリ 47,956 KB
最終ジャッジ日時 2024-06-26 07:18:28
合計ジャッジ時間 10,914 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

package no079;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] c = new int[7];
		for(int i=0;i<n;i++) {
			c[sc.nextInt()]++;
		}
		int ans = 0;
		int max = 0;
		for(int i=1;i<7;i++) {
			if (max <= c[i]) {
				max = c[i];
				ans = i;
			}
		}
		System.out.println(ans);
	}

}
0