結果
| 問題 | No.24 数当てゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-29 13:38:38 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 19 ms / 5,000 ms |
| + 252µs | |
| コード長 | 748 bytes |
| 記録 | |
| コンパイル時間 | 668 ms |
| コンパイル使用メモリ | 113,748 KB |
| 実行使用メモリ | 27,876 KB |
| 最終ジャッジ日時 | 2026-10-11 02:03:19 |
| 合計ジャッジ時間 | 1,859 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
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;
class Program
{
static void Main()
{
int[] list =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
};
int n = int.Parse(Console.ReadLine());
for(int i = 0; i < n; i++)
{
string[] s = Console.ReadLine().Split();
int[] num = new int[4];
for(int j = 0; j < 4; j++)
{
num[j] = int.Parse(s[j]);
}
if(s[4] == "YES")
{
list = list.Where(a => num.Contains(a)).ToArray();
}
else
{
list = list.Where(a => !num.Contains(a)).ToArray();
}
}
Console.WriteLine($"{list[0]}");
}
}