結果
問題 | No.24 数当てゲーム |
ユーザー |
|
提出日時 | 2020-04-29 13:38:38 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 36 ms / 5,000 ms |
コード長 | 748 bytes |
コンパイル時間 | 4,863 ms |
コンパイル使用メモリ | 113,464 KB |
実行使用メモリ | 19,200 KB |
最終ジャッジ日時 | 2024-11-28 04:11:07 |
合計ジャッジ時間 | 3,867 ms |
ジャッジサーバーID (参考情報) |
judge4 / 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.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]}");}}