結果

問題 No.82 市松模様
コンテスト
ユーザー 🍡yurahuna
提出日時 2016-01-21 03:02:52
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 78 ms / 5,000 ms
コード長 272 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 152 ms
コンパイル使用メモリ 77,588 KB
最終ジャッジ日時 2025-12-03 19:03:36
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

dic = {True:'B', False:'W'}

W, H, C = raw_input().split()
W, H = int(W), int(H)
flag = True if C == 'B' else False
for i in xrange(H):
    s = ""
    for j in xrange(W):
        s += dic[flag]
        flag = not flag
    print s
    if W % 2 == 0:
        flag = not flag
0