結果

問題 No.82 市松模様
ユーザー HIROPON87069639HIROPON87069639
提出日時 2016-02-13 23:09:14
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 475 bytes
コンパイル時間 42 ms
コンパイル使用メモリ 7,104 KB
実行使用メモリ 6,444 KB
最終ジャッジ日時 2023-10-22 05:03:05
合計ジャッジ時間 809 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,444 KB
testcase_01 AC 11 ms
6,444 KB
testcase_02 AC 11 ms
6,444 KB
testcase_03 AC 11 ms
6,444 KB
testcase_04 AC 11 ms
6,444 KB
testcase_05 AC 11 ms
6,444 KB
testcase_06 AC 11 ms
6,444 KB
testcase_07 AC 12 ms
6,444 KB
testcase_08 AC 11 ms
6,444 KB
testcase_09 AC 11 ms
6,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 2016.2.13
inp = raw_input().split()
W = int(inp[0])
H = int(inp[1])
C = inp[2]
simaA = []
simaB = []
tag = C
for i in range(0,W):
    if tag == "W":
        simaA.append(tag)
        tag = "B"
        simaB.append(tag)
    else:
        simaA.append(tag)
        tag = "W"
        simaB.append(tag)
flag = "simaA"
for i in range(0, H):
    if flag == "simaA":
        print "".join(simaA)
        flag = "simaB"
    else:
        print "".join(simaB)
        flag = "simaA"
0