結果

問題 No.82 市松模様
ユーザー deepjugglingdeepjuggling
提出日時 2023-06-08 22:29:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 295 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 76,132 KB
最終ジャッジ日時 2023-08-30 01:51:05
合計ジャッジ時間 1,836 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,816 KB
testcase_01 AC 70 ms
70,940 KB
testcase_02 AC 71 ms
70,816 KB
testcase_03 AC 71 ms
70,644 KB
testcase_04 AC 72 ms
70,748 KB
testcase_05 AC 74 ms
70,820 KB
testcase_06 AC 72 ms
70,632 KB
testcase_07 AC 72 ms
71,016 KB
testcase_08 AC 83 ms
76,116 KB
testcase_09 AC 81 ms
76,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

w,h,c = input().split()
x = ["W","B"]
a = 0
if c == x[0]:
    a = 1
else:
    a = 0
for i in range(int(h)):
    a += 1
    a %= 2
    if a == 0:
        b = 1
    else:
        b = 0
    z = []
    for j in range(int(w)):
        b += 1
        b %= 2
        z.append(x[b])
    print(*z,sep="")
0