結果

問題 No.182 新規性の虜
ユーザー ooh_21ooh_21
提出日時 2018-01-15 14:32:02
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 114 ms / 5,000 ms
コード長 1,172 bytes
コンパイル時間 1,986 ms
コンパイル使用メモリ 103,776 KB
実行使用メモリ 34,408 KB
最終ジャッジ日時 2023-08-27 17:04:22
合計ジャッジ時間 5,568 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
20,752 KB
testcase_01 AC 60 ms
22,852 KB
testcase_02 AC 60 ms
22,792 KB
testcase_03 AC 60 ms
22,712 KB
testcase_04 AC 60 ms
20,852 KB
testcase_05 AC 59 ms
22,792 KB
testcase_06 AC 59 ms
20,920 KB
testcase_07 AC 59 ms
22,776 KB
testcase_08 AC 94 ms
28,084 KB
testcase_09 AC 114 ms
34,408 KB
testcase_10 AC 108 ms
32,000 KB
testcase_11 AC 101 ms
28,656 KB
testcase_12 AC 82 ms
27,308 KB
testcase_13 AC 60 ms
20,860 KB
testcase_14 AC 58 ms
20,740 KB
testcase_15 AC 58 ms
22,892 KB
testcase_16 AC 59 ms
20,704 KB
testcase_17 AC 59 ms
20,656 KB
testcase_18 AC 93 ms
26,316 KB
testcase_19 AC 85 ms
25,184 KB
testcase_20 AC 79 ms
22,196 KB
testcase_21 AC 98 ms
28,752 KB
testcase_22 AC 82 ms
22,876 KB
testcase_23 AC 59 ms
20,656 KB
testcase_24 AC 109 ms
31,968 KB
testcase_25 AC 93 ms
25,400 KB
testcase_26 AC 73 ms
21,872 KB
testcase_27 AC 61 ms
20,716 KB
evil01.txt AC 121 ms
32,264 KB
evil02.txt AC 118 ms
34,344 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;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace lecture2018._1._15
{
    class Program
    {
        static void Main(string[] args)
        {
            string line = Console.ReadLine();
            int N = int.Parse(line);

            line = Console.ReadLine();

            string[] hoge = line.Split();

            int[] Num = new int[N];
            for(int i = 0;i < N;i++)
            {
                Num[i] = int.Parse(hoge[i]);
            }

            Dictionary<int, int> counts = new Dictionary<int,int>();
            for(int i = 0;i < N;i++)
            {
                if (counts.ContainsKey(Num[i])){
                    counts[Num[i]] += 1;
                }
                else
                {
                    counts[Num[i]] = 1;
                }
            }
            int ans = 0;
            foreach (int key in counts.Keys)
            {
                if (counts[key] == 1)
                {
                    ans++;
                }
            }

            Console.WriteLine(ans);
        }
    }
}
0