結果

問題 No.82 市松模様
コンテスト
ユーザー k0825
提出日時 2019-03-31 17:30:53
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 21 ms / 5,000 ms
+ 881µs
コード長 208 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 58 ms
コンパイル使用メモリ 15,104 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2026-09-27 19:24:08
合計ジャッジ時間 1,859 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

w,h,c=input().split();f=[0,1][c=='W']
w,h=int(w),int(h)
for i in range(h):
	for j in range(w):
		if not w%2 and i%2:
			print(['B','W'][not f%2],end='')
		else:
			print(['B','W'][f%2],end='')
		f+=1
	print()
0