結果
| 問題 | No.24 数当てゲーム | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-05-27 15:11:42 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 3,105 bytes | 
| コンパイル時間 | 1,014 ms | 
| コンパイル使用メモリ | 104,448 KB | 
| 実行使用メモリ | 18,048 KB | 
| 最終ジャッジ日時 | 2024-09-20 15:14:51 | 
| 合計ジャッジ時間 | 1,888 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 WA * 7 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = int.Parse(Console.ReadLine());
            string[] b = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
            string[] c = new string[b.Length];
            string[,] s1 = new string[a, 5];
            string ans="";
            for (int i = 0; i < a; i++)//入力
            {
                string[] s = Console.ReadLine().Split(' ');
                
                for (int j = 0; j <= 4; j++)
                {
                    s1[i, j] = s[j];
                }
            }
            for (int x=0;x<a;x++)//文字列の長さ分足す
            {
                if (s1[x, 4] == "YES")//YESの時
                {
                    for (int y = 0; y <= 3; y++)
                    {
                        for (int z = 0; z < 9; z++)
                        {
                            if (s1[x, y] == b[z])
                            {
                                if (c[z] == "c")
                                {
                                    c[z] = "d";
                                }
                                else
                                {
                                    c[z] = "c";
                                    break;
                                }
                            }
                        }
                    }
                }
                else//NOの時
                {
                    for (int y = 0; y <= 3; y++)
                    {
                        for (int z = 0; z < 9; z++)
                        {
                            if (s1[x, y] == b[z])
                            {
                                c[z] = "c";
                                break;
                            }
                        }
                    }
  
                }
                    if (x == a - 1)
                    {
                    int count = 0;
                    for (int t = 0; t < a - 1; t++)
                    {
                        if (s1[t, 4] == "YES")//YESの時
                        {
                            count++;
                        }
                    }
                    if (count >= 1)
                    {
                        for (int s = 0; s < c.Length; s++)
                        {
                            if (c[s] == "d")
                            {
                                ans += b[s];
                            }
                        }
                        Console.WriteLine(ans);
                    }
                    else
                    {
                        for (int s = 0; s < c.Length; s++)
                        {
                            if (c[s] == null)
                            {
                                ans += b[s];
                            }
                        }
                        Console.WriteLine(ans);
                    }
                    }
                }
            }
        }
    }
            
            
            
        