結果

問題 No.82 市松模様
ユーザー あかりきあかりき
提出日時 2021-02-08 07:31:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 5,000 ms
コード長 226 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 75,764 KB
最終ジャッジ日時 2023-09-18 12:19:14
合計ジャッジ時間 1,808 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,164 KB
testcase_01 AC 72 ms
71,316 KB
testcase_02 AC 70 ms
71,112 KB
testcase_03 AC 69 ms
71,156 KB
testcase_04 AC 70 ms
71,128 KB
testcase_05 AC 71 ms
71,272 KB
testcase_06 AC 70 ms
71,444 KB
testcase_07 AC 70 ms
71,408 KB
testcase_08 AC 74 ms
75,708 KB
testcase_09 AC 75 ms
75,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

w,h,c=input().split()
w=int(w)
h=int(h)
for i in range(h):
  l=[]
  for j in range(w):
    if (j+i)%2==0:
      l.append(c)
    else:
      if c=='B':
        l.append('W')
      else:
        l.append('B')
  print(''.join(l))
0