結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー Mcpu3Mcpu3
提出日時 2018-06-22 00:23:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 451 ms / 5,000 ms
コード長 378 bytes
コンパイル時間 4,509 ms
コンパイル使用メモリ 71,112 KB
実行使用メモリ 60,972 KB
最終ジャッジ日時 2023-09-13 07:46:38
合計ジャッジ時間 10,194 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 203 ms
58,828 KB
testcase_01 AC 431 ms
60,500 KB
testcase_02 AC 121 ms
56,188 KB
testcase_03 AC 120 ms
55,788 KB
testcase_04 AC 120 ms
56,060 KB
testcase_05 AC 451 ms
60,424 KB
testcase_06 AC 119 ms
55,960 KB
testcase_07 AC 119 ms
56,044 KB
testcase_08 AC 120 ms
55,776 KB
testcase_09 AC 119 ms
56,116 KB
testcase_10 AC 116 ms
56,872 KB
testcase_11 AC 127 ms
55,728 KB
testcase_12 AC 120 ms
56,040 KB
testcase_13 AC 120 ms
55,860 KB
testcase_14 AC 393 ms
59,968 KB
testcase_15 AC 294 ms
60,276 KB
testcase_16 AC 417 ms
60,972 KB
testcase_17 AC 267 ms
59,980 KB
testcase_18 AC 399 ms
60,264 KB
testcase_19 AC 373 ms
60,656 KB
testcase_20 AC 437 ms
60,508 KB
testcase_21 AC 186 ms
58,360 KB
testcase_22 AC 321 ms
60,084 KB
testcase_23 AC 433 ms
60,600 KB
testcase_24 AC 431 ms
60,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no79{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int n,i,a=0,m=0,l[]=new int[100000],t[]=new int[6];
		n=stdIn.nextInt();
		for(i=0;i<n;i++) {
			l[i]=stdIn.nextInt();
			t[l[i]-1]++;
		}
		for(i=5;i>=0;i--) {
			if(m<t[i]) {
				m=t[i];
				a=i;
			}
		}
		System.out.print(a+1);
	}
}
0