結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー mbanmban
提出日時 2016-11-07 12:47:00
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 90 ms / 5,000 ms
コード長 571 bytes
コンパイル時間 2,179 ms
コンパイル使用メモリ 105,768 KB
実行使用メモリ 28,500 KB
最終ジャッジ日時 2023-09-08 15:01:23
合計ジャッジ時間 5,097 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
21,940 KB
testcase_01 AC 89 ms
28,288 KB
testcase_02 AC 60 ms
25,780 KB
testcase_03 AC 61 ms
21,700 KB
testcase_04 AC 60 ms
23,736 KB
testcase_05 AC 88 ms
26,312 KB
testcase_06 AC 59 ms
21,788 KB
testcase_07 AC 59 ms
23,688 KB
testcase_08 AC 60 ms
21,580 KB
testcase_09 AC 60 ms
21,652 KB
testcase_10 AC 61 ms
21,592 KB
testcase_11 AC 61 ms
21,740 KB
testcase_12 AC 61 ms
23,764 KB
testcase_13 AC 61 ms
19,676 KB
testcase_14 AC 80 ms
20,844 KB
testcase_15 AC 74 ms
22,540 KB
testcase_16 AC 84 ms
23,820 KB
testcase_17 AC 72 ms
24,480 KB
testcase_18 AC 84 ms
21,688 KB
testcase_19 AC 79 ms
24,920 KB
testcase_20 AC 89 ms
28,500 KB
testcase_21 AC 68 ms
23,944 KB
testcase_22 AC 73 ms
22,628 KB
testcase_23 AC 86 ms
26,264 KB
testcase_24 AC 90 ms
26,384 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.Collections.Generic;
using System.Linq;

class Magatro
{
    static void Main()
    {
        int N = int.Parse(Console.ReadLine());
        int[] L = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
        int[] cnt = new int[7];

        for(int i = 0; i < N; i++) {
            cnt[L[i]]++;

        }
        int max = cnt.Max();
        for(int i = 6; i >= 1; i--)
        {
            if (max == cnt[i])
            {
                Console.WriteLine(i);
                return;
            }
        }
      
    }
}
0