結果

問題 No.82 市松模様
ユーザー huffman56huffman56
提出日時 2022-06-19 16:55:11
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,199 bytes
コンパイル時間 2,334 ms
コンパイル使用メモリ 105,856 KB
実行使用メモリ 19,072 KB
最終ジャッジ日時 2024-10-11 19:49:18
合計ジャッジ時間 3,234 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
using static System.Console;


namespace yukicoder
{
    class Program
    {
        static void Main()
        {
            var t = Console.ReadLine().Split().ToArray();
            var w = int.Parse(t[0]);
            var h = int.Parse(t[1]);
            var c = t[2];
            var str = c;

            for (var i = 0; i < h; i++)
            {
                for (var j = 0; j < w; j++)
                {
                    if (str[j] == 'B')
                    {
                        str += 'W';
                    }
                    else
                    {
                        str += 'B';
                    }
                }

                Console.WriteLine(str);

                if(str[0] == 'B')
                {
                    str = "W";
                }
                else
                {
                    str = "B";
                }
            }
        }
        
    }
}
0