結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー uafr_csuafr_cs
提出日時 2015-05-15 02:45:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 479 ms / 5,000 ms
コード長 484 bytes
コンパイル時間 2,247 ms
コンパイル使用メモリ 71,592 KB
実行使用メモリ 60,968 KB
最終ジャッジ日時 2023-09-08 14:28:04
合計ジャッジ時間 9,953 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 203 ms
59,224 KB
testcase_01 AC 464 ms
60,296 KB
testcase_02 AC 125 ms
55,820 KB
testcase_03 AC 123 ms
55,872 KB
testcase_04 AC 128 ms
55,736 KB
testcase_05 AC 479 ms
60,612 KB
testcase_06 AC 131 ms
56,300 KB
testcase_07 AC 122 ms
55,940 KB
testcase_08 AC 128 ms
55,788 KB
testcase_09 AC 128 ms
55,544 KB
testcase_10 AC 124 ms
55,836 KB
testcase_11 AC 122 ms
55,796 KB
testcase_12 AC 127 ms
55,544 KB
testcase_13 AC 125 ms
55,740 KB
testcase_14 AC 379 ms
60,332 KB
testcase_15 AC 288 ms
60,100 KB
testcase_16 AC 419 ms
60,552 KB
testcase_17 AC 264 ms
60,492 KB
testcase_18 AC 399 ms
60,344 KB
testcase_19 AC 371 ms
60,516 KB
testcase_20 AC 445 ms
60,968 KB
testcase_21 AC 194 ms
58,064 KB
testcase_22 AC 350 ms
58,240 KB
testcase_23 AC 448 ms
60,592 KB
testcase_24 AC 444 ms
60,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		final int SIZE = 6;
		final int N = sc.nextInt();
		int[] counts = new int[SIZE];
		for(int i = 0; i < N; i++){
			counts[sc.nextInt() - 1]++;
		}
		
		int max = 0;
		for(int i = 0; i < SIZE; i++){
			if(counts[max] <= counts[i]){
				max = i;
			}
		}
		
		System.out.println(max + 1);
		
	}
	
}
0