結果

問題 No.82 市松模様
ユーザー nanophoto12nanophoto12
提出日時 2014-12-02 23:53:51
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 803 bytes
コンパイル時間 2,103 ms
コンパイル使用メモリ 104,968 KB
実行使用メモリ 23,868 KB
最終ジャッジ日時 2023-09-02 01:13:06
合計ジャッジ時間 3,492 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
21,580 KB
testcase_01 AC 59 ms
21,844 KB
testcase_02 AC 59 ms
19,772 KB
testcase_03 AC 58 ms
21,824 KB
testcase_04 AC 59 ms
23,684 KB
testcase_05 AC 58 ms
21,676 KB
testcase_06 AC 59 ms
21,644 KB
testcase_07 AC 58 ms
21,808 KB
testcase_08 AC 59 ms
23,756 KB
testcase_09 AC 58 ms
23,868 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;

class Program82
{
    public static void Main(string[] args)
    {
        var line = Console.ReadLine().Split(' ').ToArray();
        var width = int.Parse(line[0]);
        var height = int.Parse(line[1]);
        var isWhite = line[2] != "B";
        for (int y = 0; y < height; y++)
        {
            string text = string.Empty;
            isWhite = !isWhite;
            var t = isWhite;
            for (int x = 0; x < width; x++)
            {
                t = !t;
                if (t)
                {
                    text += "W";
                }
                else
                {
                    text += "B";
                }
            }
            Console.WriteLine(text);
        }        
    }
}
0