結果

問題 No.82 市松模様
ユーザー akitsugu777akitsugu777
提出日時 2018-10-22 16:45:39
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 268 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-19 03:55:09
合計ジャッジ時間 1,036 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 4 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

w, h, s = map(str, input().split())
w = int(w)
h = int(h)

if w == h == 1:
    print(s)

else:
    if s == 'B':
        s = 'BW' * (w*h//2)
    else:
        s = 'WB' * (w*h//2)
    
    s = [s[i:i+w] for i in range(0, len(s), w)]
    
    for i in s:
        print(i)
0