結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー soujikisoujiki
提出日時 2015-04-29 20:28:07
言語 Java19
(openjdk 21)
結果
AC  
実行時間 470 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 3,303 ms
コンパイル使用メモリ 72,112 KB
実行使用メモリ 60,808 KB
最終ジャッジ日時 2023-09-08 14:26:48
合計ジャッジ時間 10,792 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 203 ms
58,764 KB
testcase_01 AC 456 ms
60,644 KB
testcase_02 AC 125 ms
56,116 KB
testcase_03 AC 125 ms
55,672 KB
testcase_04 AC 126 ms
55,776 KB
testcase_05 AC 470 ms
60,808 KB
testcase_06 AC 122 ms
55,736 KB
testcase_07 AC 122 ms
56,028 KB
testcase_08 AC 122 ms
55,940 KB
testcase_09 AC 126 ms
55,916 KB
testcase_10 AC 126 ms
55,456 KB
testcase_11 AC 125 ms
55,688 KB
testcase_12 AC 126 ms
53,896 KB
testcase_13 AC 124 ms
55,616 KB
testcase_14 AC 375 ms
58,600 KB
testcase_15 AC 296 ms
59,948 KB
testcase_16 AC 407 ms
60,448 KB
testcase_17 AC 280 ms
59,804 KB
testcase_18 AC 407 ms
60,696 KB
testcase_19 AC 358 ms
60,336 KB
testcase_20 AC 442 ms
60,604 KB
testcase_21 AC 190 ms
58,052 KB
testcase_22 AC 318 ms
60,444 KB
testcase_23 AC 435 ms
60,456 KB
testcase_24 AC 434 ms
60,368 KB
権限があれば一括ダウンロードができます

ソースコード

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