結果

問題 No.82 市松模様
ユーザー akihito0000akihito0000
提出日時 2016-09-24 11:03:05
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 291 bytes
コンパイル時間 1,659 ms
コンパイル使用メモリ 6,664 KB
実行使用メモリ 6,044 KB
最終ジャッジ日時 2023-08-11 06:33:06
合計ジャッジ時間 842 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,020 KB
testcase_01 AC 11 ms
6,036 KB
testcase_02 AC 11 ms
6,044 KB
testcase_03 AC 11 ms
5,880 KB
testcase_04 AC 11 ms
5,928 KB
testcase_05 AC 10 ms
5,928 KB
testcase_06 AC 11 ms
5,960 KB
testcase_07 AC 11 ms
5,892 KB
testcase_08 AC 10 ms
5,864 KB
testcase_09 AC 11 ms
5,888 KB
権限があれば一括ダウンロードができます

ソースコード

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