結果

問題 No.2153 何コーダーが何人?
ユーザー mobchanmobchan
提出日時 2023-04-23 03:03:54
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 677 bytes
コンパイル時間 7,890 ms
コンパイル使用メモリ 166,608 KB
実行使用メモリ 183,604 KB
最終ジャッジ日時 2024-04-25 03:18:14
合計ジャッジ時間 9,789 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
29,440 KB
testcase_01 AC 46 ms
29,696 KB
testcase_02 AC 48 ms
29,824 KB
testcase_03 AC 47 ms
29,696 KB
testcase_04 AC 46 ms
29,568 KB
testcase_05 AC 44 ms
29,824 KB
testcase_06 AC 47 ms
29,696 KB
testcase_07 AC 45 ms
29,696 KB
testcase_08 AC 44 ms
29,952 KB
testcase_09 AC 46 ms
29,824 KB
testcase_10 AC 47 ms
29,696 KB
testcase_11 AC 45 ms
29,824 KB
testcase_12 AC 50 ms
29,804 KB
testcase_13 AC 45 ms
29,568 KB
testcase_14 AC 46 ms
29,824 KB
testcase_15 AC 44 ms
29,668 KB
testcase_16 AC 46 ms
30,080 KB
testcase_17 AC 48 ms
29,696 KB
testcase_18 AC 48 ms
29,696 KB
testcase_19 AC 48 ms
29,568 KB
testcase_20 AC 46 ms
183,604 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (83 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {
        var N = int.Parse(Console.ReadLine());
        var dic = new Dictionary<string, int>();
        for (int i = 0; i < N; i++)
        {
            var temp = Console.ReadLine().Split();
            if (!dic.ContainsKey(temp[0])) dic.Add(temp[0], int.Parse(temp[1]));
            else dic[temp[0]] = int.Parse(temp[1]);
        }

        var dic2 = new Dictionary<int, int>();
        for (int i = 0; i < 8; i++) dic2.Add(i, 0);

        foreach (var value in dic.Values) dic2[value]++;
        foreach (var value in dic2.Values) Console.WriteLine(value);
    }
}
0