結果

問題 No.82 市松模様
ユーザー 双六
提出日時 2020-07-22 10:38:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 67 ms / 5,000 ms
コード長 583 bytes
コンパイル時間 366 ms
コンパイル使用メモリ 82,328 KB
実行使用メモリ 62,208 KB
最終ジャッジ日時 2025-01-03 09:53:09
合計ジャッジ時間 1,664 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")
import copy

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	W, H, C = list(input().split())
	W = int(W)
	H = int(H)
	if C == "W":
		c = "B"
	else:
		c = "W"
	table = [[None] * W for i in range(H)]
	for i in range(H):
		for j in range(W):
			if (i + j) % 2 == 0:
				table[i][j] = C
			else:
				table[i][j] = c

	for i in range(H):
		print("".join(table[i]))

if __name__ == '__main__':
	main()
0