結果

問題 No.82 市松模様
ユーザー colognecologne
提出日時 2022-01-26 19:28:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 56 ms / 5,000 ms
コード長 358 bytes
コンパイル時間 654 ms
コンパイル使用メモリ 81,968 KB
実行使用メモリ 64,580 KB
最終ジャッジ日時 2024-12-23 13:22:02
合計ジャッジ時間 1,679 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
52,240 KB
testcase_01 AC 40 ms
52,744 KB
testcase_02 AC 39 ms
52,616 KB
testcase_03 AC 41 ms
51,812 KB
testcase_04 AC 40 ms
52,824 KB
testcase_05 AC 39 ms
52,332 KB
testcase_06 AC 41 ms
53,156 KB
testcase_07 AC 42 ms
53,252 KB
testcase_08 AC 56 ms
64,580 KB
testcase_09 AC 55 ms
63,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys


def input(): return sys.stdin.readline().rstrip()


def main():
    W, H, C = input().split()
    for i in range(int(H)):
        for j in range(int(W)):
            if ((i+j) % 2 == 0) == (C == 'W'):
                print('W', end='')
            else:
                print('B', end='')
        print()


if __name__ == '__main__':
    main()
0