結果
問題 | No.82 市松模様 |
ユーザー |
![]() |
提出日時 | 2020-04-08 17:54:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 5,000 ms |
コード長 | 596 bytes |
コンパイル時間 | 322 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-18 21:36:02 |
合計ジャッジ時間 | 868 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
w,h,c = input().split()w,h = int(w), int(h)for i in range(h):if i%2==0:if c=='W':line = 'WB'*(w//2)else:line = 'BW'*(w//2)if w%2!=0 and w!=1:line += line[-2]elif w==1:line = celse:if c=='W':line = 'BW'*(w//2)else:line = 'WB'*(w//2)if w%2!=0 and w!=1:line += line[-2]elif w==1:if c=='W':line = 'B'else:line = 'W'print(line)