結果

問題 No.82 市松模様
ユーザー notsix4notsix4
提出日時 2021-11-26 20:00:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 271 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2023-09-12 02:58:05
合計ジャッジ時間 1,239 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,976 KB
testcase_01 AC 16 ms
7,852 KB
testcase_02 AC 16 ms
7,776 KB
testcase_03 AC 16 ms
7,952 KB
testcase_04 AC 16 ms
7,848 KB
testcase_05 AC 16 ms
7,908 KB
testcase_06 AC 16 ms
7,916 KB
testcase_07 AC 16 ms
7,804 KB
testcase_08 AC 16 ms
7,800 KB
testcase_09 AC 15 ms
7,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if c=="B":
    d="BW"
    e="W"
    f="WB"
else:
    d="WB"
    e="B"
    f="BW"
w=int(w)
h=int(h)
a=w%2
b=w//2
if a==1:
    s=d*b+c
    t=f*b+e
else:
    s=d*b
    t=f*b
for i in range(h):
    if i%2==0:
        print(s)
    else:
        print(t)
0