結果
問題 | No.82 市松模様 |
ユーザー |
![]() |
提出日時 | 2018-11-04 02:21:01 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 422 bytes |
コンパイル時間 | 129 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-20 19:40:53 |
合計ジャッジ時間 | 1,130 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
# -*- coding: utf-8 -*-def switch(c):if c == "B":return "W"else:return "B"def line(c, l):result = ""for i in range(l):result += str(i % 2)result = result.replace('0',c)result = result.replace('1',switch(c))return resultw, h, c = [v if i == 2 else int(v) for i, v in enumerate(input().split())]for _ in range(h):print(line(c, w))c = switch(c)