結果
| 問題 | No.24 数当てゲーム | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-11-30 16:35:14 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 27 ms / 5,000 ms | 
| コード長 | 816 bytes | 
| コンパイル時間 | 1,028 ms | 
| コンパイル使用メモリ | 107,604 KB | 
| 実行使用メモリ | 18,944 KB | 
| 最終ジャッジ日時 | 2024-06-26 23:40:50 | 
| 合計ジャッジ時間 | 1,657 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
namespace StudyApp
{
    class Program
    {
        static void Main(string[] args)
        {
            int turn = int.Parse(Console.ReadLine());
            var possible_nums = new List<string> { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
            for (int i = 0; i < turn; i++)
            {
                string[] inputs = Console.ReadLine().Split(' ');
                if (inputs[4].Equals("NO"))
                {
                    possible_nums.RemoveAll(num => inputs.Contains(num));
                }
                else
                {
                    possible_nums.RemoveAll(num => !inputs.Contains(num));
                }
            }
            Console.WriteLine(possible_nums.First());
        }
    }
}
            
            
            
        