結果
| 問題 |
No.24 数当てゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-11-30 16:29:02 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 811 bytes |
| コンパイル時間 | 1,063 ms |
| コンパイル使用メモリ | 106,752 KB |
| 実行使用メモリ | 18,944 KB |
| 最終ジャッジ日時 | 2024-06-26 23:40:38 |
| 合計ジャッジ時間 | 1,788 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 RE * 2 |
コンパイルメッセージ
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> { "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());
}
}
}