結果

問題 No.82 市松模様
ユーザー Mario
提出日時 2018-05-27 23:48:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 437 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-30 07:25:52
合計ジャッジ時間 980 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

w, h, c = input().split()

head = "B" if c == "W" else "W"

for i in range(int(h)):
    if head == "W":
        pre = "W"
    else:
        pre = "B"

    for j in range(int(w)):

        if pre == "B":
            print("W", end="")
            pre = "W"

            if j == 0:
                head = "W"
        else:
            print("B", end="")
            pre = "B"

            if j == 0:
                head = "B"
    print()
0