結果

問題 No.82 市松模様
ユーザー akihito0000
提出日時 2016-09-24 11:03:05
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 291 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-17 20:31:45
合計ジャッジ時間 691 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
# -*- coding: utf-8 -*-

### INPUT ###
W,H,C = map(str, raw_input().split())
ans = ""
if C == "B":
	tmp = "BW" * int(W) * int(H)
else:
	tmp = "WB" * int(W) * int(H)

for i in range(int(H)):
	ans += tmp[ i * 0 + i % 2 : i * 0 + int(W) + i % 2] + "\n"

print ans.rstrip("\n")
0