結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー fal_rndfal_rnd
提出日時 2017-04-03 19:23:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 462 ms / 5,000 ms
コード長 367 bytes
コンパイル時間 3,441 ms
コンパイル使用メモリ 71,372 KB
実行使用メモリ 60,880 KB
最終ジャッジ日時 2023-09-08 15:07:42
合計ジャッジ時間 11,088 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 204 ms
59,048 KB
testcase_01 AC 448 ms
60,840 KB
testcase_02 AC 119 ms
55,708 KB
testcase_03 AC 120 ms
56,184 KB
testcase_04 AC 121 ms
55,972 KB
testcase_05 AC 462 ms
60,880 KB
testcase_06 AC 121 ms
55,724 KB
testcase_07 AC 120 ms
53,964 KB
testcase_08 AC 124 ms
55,712 KB
testcase_09 AC 124 ms
55,904 KB
testcase_10 AC 122 ms
56,452 KB
testcase_11 AC 120 ms
55,504 KB
testcase_12 AC 120 ms
56,296 KB
testcase_13 AC 123 ms
56,140 KB
testcase_14 AC 375 ms
60,460 KB
testcase_15 AC 287 ms
59,996 KB
testcase_16 AC 404 ms
60,344 KB
testcase_17 AC 271 ms
60,052 KB
testcase_18 AC 392 ms
60,448 KB
testcase_19 AC 366 ms
60,640 KB
testcase_20 AC 434 ms
60,288 KB
testcase_21 AC 191 ms
58,740 KB
testcase_22 AC 306 ms
60,408 KB
testcase_23 AC 421 ms
60,744 KB
testcase_24 AC 447 ms
60,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{

	static final Scanner s=new Scanner(System.in);

	public static void main(String args[]){
		int n=s.nextInt(),l[]=new int[7];
		for(int i=0;i<n;i++) {
			l[s.nextInt()]++;
		}
		int res=0,v=0;
		for(int i=0;i<l.length;i++) {
			if(v<=l[i]) {
				res=Math.max(res,i);
				v=l[i];
			}
		}
		System.out.println(res);
	}
}
0