結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー chankou0920chankou0920
提出日時 2017-10-13 13:53:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 85 ms / 5,000 ms
コード長 446 bytes
コンパイル時間 2,710 ms
コンパイル使用メモリ 99,724 KB
実行使用メモリ 27,060 KB
最終ジャッジ日時 2023-09-08 15:16:45
合計ジャッジ時間 5,157 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
21,064 KB
testcase_01 AC 84 ms
27,040 KB
testcase_02 AC 56 ms
20,888 KB
testcase_03 AC 56 ms
20,816 KB
testcase_04 AC 57 ms
20,804 KB
testcase_05 AC 85 ms
27,060 KB
testcase_06 AC 57 ms
20,812 KB
testcase_07 AC 56 ms
20,764 KB
testcase_08 AC 58 ms
20,896 KB
testcase_09 AC 57 ms
20,684 KB
testcase_10 AC 57 ms
18,640 KB
testcase_11 AC 56 ms
20,624 KB
testcase_12 AC 56 ms
18,840 KB
testcase_13 AC 56 ms
20,684 KB
testcase_14 AC 75 ms
23,968 KB
testcase_15 AC 69 ms
21,628 KB
testcase_16 AC 78 ms
24,628 KB
testcase_17 AC 68 ms
21,716 KB
testcase_18 AC 79 ms
24,672 KB
testcase_19 AC 75 ms
23,976 KB
testcase_20 AC 83 ms
25,064 KB
testcase_21 AC 64 ms
19,116 KB
testcase_22 AC 72 ms
21,640 KB
testcase_23 AC 84 ms
24,964 KB
testcase_24 AC 84 ms
24,948 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Program {
	public static void Main(string[] args) {
		Console.ReadLine(); // n
		string[] s = Console.ReadLine().Split(' ');
		int[] levels = new int[6];
		for (int i = 0; i < s.Length; i++) {
			levels[int.Parse(s[i]) - 1]++;
		}
		
		int max = 0;
		int level = 0;
		for (int i = 0; i < levels.Length; i++) {
			if (levels[i] >= max) {
				max = levels[i];
				level = i + 1;
			}
		}
		Console.WriteLine(level);
	}
}
0