結果

問題 No.82 市松模様
コンテスト
ユーザー 🍡yurahuna
提出日時 2016-01-21 03:02:52
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
AC  
実行時間 63 ms / 5,000 ms
+ 429µs
コード長 272 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 70 ms
コンパイル使用メモリ 62,612 KB
実行使用メモリ 63,436 KB
最終ジャッジ日時 2026-11-20 20:24:30
合計ジャッジ時間 2,492 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8
権限があれば一括ダウンロードができます

ソースコード

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