結果

問題 No.82 市松模様
ユーザー notsix4notsix4
提出日時 2021-11-26 16:54:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 518 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 8,008 KB
最終ジャッジ日時 2023-09-11 23:51:05
合計ジャッジ時間 1,150 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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+"\r\n"
    t=f*b+e+"\r\n"
else:
    s=d*b+"\r\n"
    t=f*b+"\r\n"
p=h%2
q=h//2
if p==1:
    l=(s+t)*q+s
else:
    l=(s+t)*q
print(l)
"""        
w,h,c=input().split()
w=int(w)
h=int(h)
q=w*h//2
if c=="B":
    d="BW"
else:
    d="WB"
s=""
if w*h%2==1:
    s=d*q+c
else:
    s=d*q
t=""
print(s)
for i in range(0,w*h-w+1,w):
    t=t+s[i:i+w]+'\r\n'
    
print(t)
"""
0