結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー mustonmuston
提出日時 2016-06-01 16:10:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 445 ms / 5,000 ms
コード長 694 bytes
コンパイル時間 4,401 ms
コンパイル使用メモリ 72,252 KB
実行使用メモリ 60,864 KB
最終ジャッジ日時 2023-09-08 14:51:56
合計ジャッジ時間 10,635 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 200 ms
58,736 KB
testcase_01 AC 428 ms
60,356 KB
testcase_02 AC 120 ms
56,068 KB
testcase_03 AC 120 ms
55,764 KB
testcase_04 AC 124 ms
55,740 KB
testcase_05 AC 445 ms
60,864 KB
testcase_06 AC 121 ms
56,024 KB
testcase_07 AC 120 ms
55,664 KB
testcase_08 AC 123 ms
56,188 KB
testcase_09 AC 125 ms
55,492 KB
testcase_10 AC 126 ms
55,400 KB
testcase_11 AC 123 ms
56,128 KB
testcase_12 AC 120 ms
55,916 KB
testcase_13 AC 122 ms
56,124 KB
testcase_14 AC 384 ms
58,564 KB
testcase_15 AC 286 ms
60,264 KB
testcase_16 AC 398 ms
60,804 KB
testcase_17 AC 276 ms
59,952 KB
testcase_18 AC 408 ms
60,192 KB
testcase_19 AC 349 ms
60,568 KB
testcase_20 AC 436 ms
60,188 KB
testcase_21 AC 196 ms
58,532 KB
testcase_22 AC 321 ms
60,568 KB
testcase_23 AC 420 ms
60,240 KB
testcase_24 AC 430 ms
60,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

/**
 * 
 * @author 
 * No.79
 */
public class No79 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		//評価した人数
		int[] n = new int[scan.nextInt()];
		//評価レベルの数
		int[] levelCount = new int[6];
		//最終的な評価レベル
		int level = 0;
		//評価する
		for(int i=0;i<n.length;i++){
			n[i] = scan.nextInt();
		}
		//同じ評価の数を数えていく
		for(int i=0;i<n.length;i++){
			levelCount[n[i]-1]++;
		}
		//評価レベルの多いものを出す
		for(int i=0;i<levelCount.length;i++){
			if(levelCount[level]<=levelCount[i]){
				level = i;
			}
		}
		System.out.println(level+1);
	}
}
0