結果

問題 No.82 市松模様
コンテスト
ユーザー akitsugu777
提出日時 2018-12-13 16:38:56
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 99 ms / 5,000 ms
+ 25µs
コード長 244 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 307 ms
コンパイル使用メモリ 21,208 KB
実行使用メモリ 15,788 KB
最終ジャッジ日時 2026-09-03 18:57:56
合計ジャッジ時間 2,498 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

w, h, s = input().split()
w = int(w)
h = int(h)

if s == 'B':
    l1 = ('BW'*25)[:w]
    l2 = ('WB'*25)[:w]
else:
    l1 = ('WB'*25)[:w]
    l2 = ('BW'*25)[:w]

for i in range(h):
    if i % 2 == 0:
        print(l1)
    else:
        print(l2)
0