結果

問題 No.82 市松模様
ユーザー kaminomisosirukaminomisosiru
提出日時 2018-02-04 22:44:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 430 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 7,980 KB
最終ジャッジ日時 2023-09-12 16:09:51
合計ジャッジ時間 825 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,936 KB
testcase_01 AC 15 ms
7,904 KB
testcase_02 AC 15 ms
7,924 KB
testcase_03 AC 15 ms
7,900 KB
testcase_04 AC 16 ms
7,892 KB
testcase_05 AC 16 ms
7,964 KB
testcase_06 AC 16 ms
7,920 KB
testcase_07 AC 15 ms
7,956 KB
testcase_08 AC 17 ms
7,980 KB
testcase_09 AC 17 ms
7,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
import math

w,h,c = input().split(" ")
w,h = int(w),int(h)
rev = {
    "B":"W",
    "W":"B"
}

for i in range(h):
    for j in range(w):
        if i % 2 == 0:
            if j % 2 == 0:
                print(c,end="")
            else:
                print(rev[c],end="")
        else:
            if j % 2 == 1:
                print(c,end="")
            else:
                print(rev[c],end="")
    print()
0