結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー k_kadora
提出日時 2015-05-23 11:13:43
言語 Java
(openjdk 23)
結果
AC  
実行時間 529 ms / 5,000 ms
コード長 398 bytes
コンパイル時間 3,847 ms
コンパイル使用メモリ 76,308 KB
実行使用メモリ 47,820 KB
最終ジャッジ日時 2024-06-26 07:35:51
合計ジャッジ時間 11,514 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Level{
	public static void main(String[] arg){
		Scanner sc = new Scanner(System.in);
		int n,temp,amount=0,res=0;
		n = sc.nextInt();
		int[] l = {0,0,0,0,0,0};
		for(int i = 0;i<n;i++){
			temp = sc.nextInt();
			l[temp-1]=l[temp-1] + 1;
		}
		for(int i =0;i<6;i++){
			if(amount<= l[i]){
				amount = l[i];
				res = i+1;
			}
		}
		System.out.println(res);
	}
}
0