結果

問題 No.82 市松模様
ユーザー ktshunktshun
提出日時 2015-05-29 23:42:37
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 294 bytes
コンパイル時間 408 ms
コンパイル使用メモリ 6,604 KB
実行使用メモリ 5,988 KB
最終ジャッジ日時 2023-09-20 17:13:43
合計ジャッジ時間 1,421 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,860 KB
testcase_01 AC 11 ms
5,888 KB
testcase_02 AC 12 ms
5,760 KB
testcase_03 AC 12 ms
5,988 KB
testcase_04 AC 12 ms
5,828 KB
testcase_05 AC 12 ms
5,876 KB
testcase_06 AC 12 ms
5,936 KB
testcase_07 AC 11 ms
5,916 KB
testcase_08 AC 11 ms
5,984 KB
testcase_09 AC 11 ms
5,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding:utf-8 -*-

if __name__ == "__main__":
	w,h,c = raw_input().split()
	w = int(w)
	h = int(h)
	c = list(c)
	if c[0] == "B":
		c.append("W")
	else:
		c.append("B")
	for i in range(h):
		if w % 2 == 1:
			print ''.join(c) * (w/2) + c[0]
		else:
			print ''.join(c) * (w/2)
		c = c[::-1]
0