結果

問題 No.82 市松模様
ユーザー vwxyzvwxyz
提出日時 2021-07-29 00:03:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 5,000 ms
コード長 325 bytes
コンパイル時間 1,008 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 76,488 KB
最終ジャッジ日時 2023-10-11 21:58:46
合計ジャッジ時間 2,250 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,560 KB
testcase_01 AC 73 ms
71,492 KB
testcase_02 AC 76 ms
71,300 KB
testcase_03 AC 76 ms
71,272 KB
testcase_04 AC 76 ms
71,564 KB
testcase_05 AC 74 ms
71,212 KB
testcase_06 AC 75 ms
71,292 KB
testcase_07 AC 75 ms
71,344 KB
testcase_08 AC 89 ms
76,488 KB
testcase_09 AC 86 ms
76,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
import sys

from math import gcd as GCD
read=sys.stdin.read
readline=sys.stdin.readline
readlines=sys.stdin.readlines

W,H,C=readline().split()
H=int(H)
W=int(W)
if C=='B':
    CC='W'
else:
    CC='B'
ans_lst=[[C if h%2==w%2 else CC for w in range(W)] for h in range(H)]
for ans in ans_lst:
    print(*ans,sep='')
0