結果
問題 | No.82 市松模様 |
ユーザー | trineutron |
提出日時 | 2020-04-09 18:30:21 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
AC
|
実行時間 | 17 ms / 5,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 328 ms |
コンパイル使用メモリ | 10,508 KB |
実行使用メモリ | 7,800 KB |
最終ジャッジ日時 | 2023-10-11 17:06:50 |
合計ジャッジ時間 | 957 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
7,796 KB |
testcase_01 | AC | 15 ms
7,760 KB |
testcase_02 | AC | 16 ms
7,744 KB |
testcase_03 | AC | 15 ms
7,768 KB |
testcase_04 | AC | 16 ms
7,796 KB |
testcase_05 | AC | 15 ms
7,752 KB |
testcase_06 | AC | 16 ms
7,796 KB |
testcase_07 | AC | 16 ms
7,800 KB |
testcase_08 | AC | 17 ms
7,704 KB |
testcase_09 | AC | 17 ms
7,796 KB |
ソースコード
def f(c): if c == 'B': return 'W' else: return 'B' w, h, c = input().split() w = int(w) h = int(h) for i in range(h): for j in range(w): if (i + j) % 2 == 0: print(c, end="") else: print(f(c), end="") print("")