結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー mencottonmencotton
提出日時 2017-12-26 21:46:54
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 90 ms / 5,000 ms
コード長 767 bytes
コンパイル時間 2,048 ms
コンパイル使用メモリ 104,120 KB
実行使用メモリ 28,268 KB
最終ジャッジ日時 2023-09-08 15:18:57
合計ジャッジ時間 4,921 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
22,060 KB
testcase_01 AC 89 ms
26,296 KB
testcase_02 AC 61 ms
21,624 KB
testcase_03 AC 61 ms
23,720 KB
testcase_04 AC 60 ms
21,624 KB
testcase_05 AC 88 ms
24,288 KB
testcase_06 AC 59 ms
21,676 KB
testcase_07 AC 60 ms
21,808 KB
testcase_08 AC 60 ms
23,784 KB
testcase_09 AC 61 ms
21,656 KB
testcase_10 AC 61 ms
23,768 KB
testcase_11 AC 59 ms
21,676 KB
testcase_12 AC 60 ms
19,760 KB
testcase_13 AC 60 ms
21,644 KB
testcase_14 AC 81 ms
22,952 KB
testcase_15 AC 73 ms
22,568 KB
testcase_16 AC 83 ms
23,772 KB
testcase_17 AC 72 ms
22,576 KB
testcase_18 AC 83 ms
23,664 KB
testcase_19 AC 78 ms
20,740 KB
testcase_20 AC 90 ms
26,392 KB
testcase_21 AC 67 ms
23,892 KB
testcase_22 AC 75 ms
22,588 KB
testcase_23 AC 88 ms
26,188 KB
testcase_24 AC 88 ms
28,268 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;
using System.Text;
using System.Threading.Tasks;

namespace template
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int[] a = new int[7];
            for (int i = 0; i < n; i++)
            {
                a[x[i]]++;
            }
            int ret = 0; int value = -1;
            for (int i = 1; i <= 6; i++)
            {
                if (value <= a[i])
                {
                    ret = i;
                    value = a[i];
                }
            }
            Console.WriteLine(ret);
        }
    }
}
0