結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー papipenpapipen
提出日時 2017-04-11 19:09:34
言語 Java19
(openjdk 21)
結果
AC  
実行時間 448 ms / 5,000 ms
コード長 425 bytes
コンパイル時間 2,379 ms
コンパイル使用メモリ 71,328 KB
実行使用メモリ 60,596 KB
最終ジャッジ日時 2023-09-08 15:08:04
合計ジャッジ時間 9,818 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 205 ms
58,824 KB
testcase_01 AC 445 ms
60,504 KB
testcase_02 AC 122 ms
56,108 KB
testcase_03 AC 123 ms
55,924 KB
testcase_04 AC 122 ms
55,708 KB
testcase_05 AC 445 ms
60,340 KB
testcase_06 AC 125 ms
55,936 KB
testcase_07 AC 125 ms
54,176 KB
testcase_08 AC 123 ms
55,736 KB
testcase_09 AC 125 ms
55,864 KB
testcase_10 AC 126 ms
55,780 KB
testcase_11 AC 121 ms
55,884 KB
testcase_12 AC 122 ms
55,736 KB
testcase_13 AC 128 ms
53,456 KB
testcase_14 AC 375 ms
60,596 KB
testcase_15 AC 290 ms
59,188 KB
testcase_16 AC 403 ms
59,196 KB
testcase_17 AC 275 ms
60,564 KB
testcase_18 AC 397 ms
60,144 KB
testcase_19 AC 361 ms
60,176 KB
testcase_20 AC 448 ms
60,436 KB
testcase_21 AC 188 ms
58,428 KB
testcase_22 AC 328 ms
60,020 KB
testcase_23 AC 431 ms
60,424 KB
testcase_24 AC 442 ms
60,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class N079{
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int a[] = new int[6];
		int max = 0;
		for(int i = 0; i < n; i++){
			int h = s.nextInt();
			a[h - 1]++;
		}
		for(int i = 0; i < 6; i++){
			max = Math.max(max, a[i]);
		}
		for(int i = 0; i < 6; i++){
			if(a[5 - i] == max){
				System.out.println(6 - i);
				break;
			}
		}
	}
}
0