結果
問題 | No.182 新規性の虜 |
ユーザー |
|
提出日時 | 2020-03-27 23:52:29 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 91 ms / 5,000 ms |
コード長 | 462 bytes |
コンパイル時間 | 1,185 ms |
コンパイル使用メモリ | 117,036 KB |
実行使用メモリ | 39,728 KB |
最終ジャッジ日時 | 2025-01-02 09:58:46 |
合計ジャッジ時間 | 4,513 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; using System.Collections.Generic; public class P0182 { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); var dict = new Dictionary<int, int>(); foreach(int a in Console.ReadLine().Trim().Split(' ').Select(int.Parse)) { dict[a] = dict.GetValueOrDefault(a) + 1; } Console.WriteLine(dict.AsEnumerable().Where(pair => pair.Value == 1).Count()); } }