結果

問題 No.182 新規性の虜
ユーザー ooh_20ooh_20
提出日時 2018-01-15 10:57:58
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 111 ms / 5,000 ms
コード長 1,064 bytes
コンパイル時間 2,219 ms
コンパイル使用メモリ 103,248 KB
実行使用メモリ 35,732 KB
最終ジャッジ日時 2023-08-27 17:03:33
合計ジャッジ時間 6,003 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
20,680 KB
testcase_01 AC 62 ms
22,748 KB
testcase_02 AC 63 ms
22,708 KB
testcase_03 AC 62 ms
20,584 KB
testcase_04 AC 63 ms
20,688 KB
testcase_05 AC 63 ms
22,728 KB
testcase_06 AC 61 ms
20,776 KB
testcase_07 AC 63 ms
20,736 KB
testcase_08 AC 94 ms
28,848 KB
testcase_09 AC 110 ms
35,732 KB
testcase_10 AC 102 ms
30,800 KB
testcase_11 AC 96 ms
29,340 KB
testcase_12 AC 84 ms
25,796 KB
testcase_13 AC 61 ms
20,672 KB
testcase_14 AC 61 ms
20,772 KB
testcase_15 AC 61 ms
20,840 KB
testcase_16 AC 63 ms
20,668 KB
testcase_17 AC 62 ms
20,584 KB
testcase_18 AC 100 ms
28,364 KB
testcase_19 AC 91 ms
25,232 KB
testcase_20 AC 82 ms
22,340 KB
testcase_21 AC 104 ms
26,752 KB
testcase_22 AC 86 ms
20,940 KB
testcase_23 AC 61 ms
20,772 KB
testcase_24 AC 111 ms
34,912 KB
testcase_25 AC 97 ms
25,148 KB
testcase_26 AC 75 ms
23,936 KB
testcase_27 AC 60 ms
18,780 KB
evil01.txt AC 117 ms
35,104 KB
evil02.txt AC 116 ms
35,140 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;

namespace lecture
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            string row = Console.ReadLine();
            int N = int.Parse(row);

            row = Console.ReadLine();
            // 空白区切りで一旦文字列の配列に区切る
            string[] tmp = row.Split();

            Dictionary<string, int> novelty = new Dictionary<string, int>();

            for (int i = 0; i < N; i++)
            {
                string number = tmp[i];
                if (novelty.ContainsKey(number))
                {
                    novelty[number]++;
                }
                else
                {
                    novelty[number] = 1;
                }
            }

            int noveltyCnt = 0;
            foreach (int cnt in novelty.Values)
            {
                if (cnt == 1)
                {
                    noveltyCnt++;
                }
            }

            Console.WriteLine(noveltyCnt);
        }
    }
}
0