結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー ooh_20ooh_20
提出日時 2017-06-01 10:23:57
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 111 ms / 5,000 ms
コード長 976 bytes
コンパイル時間 2,351 ms
コンパイル使用メモリ 104,068 KB
実行使用メモリ 28,452 KB
最終ジャッジ日時 2023-09-08 15:09:44
合計ジャッジ時間 5,380 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
21,932 KB
testcase_01 AC 105 ms
26,296 KB
testcase_02 AC 62 ms
21,628 KB
testcase_03 AC 63 ms
21,684 KB
testcase_04 AC 64 ms
21,684 KB
testcase_05 AC 106 ms
26,408 KB
testcase_06 AC 62 ms
23,760 KB
testcase_07 AC 61 ms
23,624 KB
testcase_08 AC 62 ms
21,688 KB
testcase_09 AC 63 ms
21,696 KB
testcase_10 AC 63 ms
21,668 KB
testcase_11 AC 63 ms
21,696 KB
testcase_12 AC 63 ms
21,784 KB
testcase_13 AC 63 ms
21,692 KB
testcase_14 AC 93 ms
22,952 KB
testcase_15 AC 78 ms
22,592 KB
testcase_16 AC 98 ms
23,840 KB
testcase_17 AC 79 ms
22,668 KB
testcase_18 AC 101 ms
23,720 KB
testcase_19 AC 89 ms
22,924 KB
testcase_20 AC 106 ms
28,452 KB
testcase_21 AC 71 ms
23,960 KB
testcase_22 AC 82 ms
22,608 KB
testcase_23 AC 105 ms
28,236 KB
testcase_24 AC 111 ms
26,272 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

namespace No._79
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] L = Console.ReadLine().Trim().Split(' ').Select(x => int.Parse(x)).ToArray();
            int modeCount = 0;
            int modeLevel = 0;

            Array.Sort(L);

            for (int i = 1; i <= 6; i++)
            {
                int buff = 0;

                for (int j = 0; j < N; j++)
                {
                    if (L[j] == i)
                    {
                        buff++;
                    }

                    if (L[j] > i)
                    {
                        break;
                    }
                }

                if (modeCount <= buff)
                {
                    modeCount = buff;
                    modeLevel = i;
                }
            }

            Console.WriteLine(modeLevel);
        }
    }
}
0