結果

問題 No.82 市松模様
ユーザー takakin
提出日時 2020-03-29 18:59:27
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 28 ms / 5,000 ms
コード長 352 bytes
コンパイル時間 503 ms
コンパイル使用メモリ 12,160 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2025-01-02 15:41:35
合計ジャッジ時間 1,066 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
w,h,c=map(str,input().split())
w=int(w)
h=int(h)
if c=="B":
  d="W"
else:
  d="B"
ans1=""
for i in range(w):
  if i%2==0:
    ans1+=c
  else:
    ans1+=d
ans2=""
for i in range(w):
  if i%2==1:
    ans2+=c
  else:
    ans2+=d
for i in range(h):
  if i%2==0:
    print(ans1)
  else:
    print(ans2)
0