結果

問題 No.82 市松模様
ユーザー nari11111nari11111
提出日時 2014-12-02 23:38:06
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 421 bytes
コンパイル時間 415 ms
コンパイル使用メモリ 6,656 KB
実行使用メモリ 6,052 KB
最終ジャッジ日時 2023-09-02 01:09:37
合計ジャッジ時間 1,226 ms
ジャッジサーバーID
(参考情報)
judge11 / judge16
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 11 ms
5,932 KB
testcase_03 AC 11 ms
5,852 KB
testcase_04 AC 11 ms
5,848 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

W, H, C = raw_input().split()
W, H = int(W), int(H)

if C=="B":
    for h in xrange(H):
        for w in xrange(W):
            if (h+w)%2==0:
                print "B",
            else:
                print "W",
        print

else:
    for h in xrange(H):
        for w in xrange(W):
            if (h+w)%2==0:
                print "W",
            else:
                print "B",
        print
0