結果

問題 No.38 赤青白ブロック
ユーザー ゆるくゆるく
提出日時 2014-10-13 00:33:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 348 bytes
コンパイル時間 348 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 8,012 KB
最終ジャッジ日時 2023-08-28 21:01:44
合計ジャッジ時間 1,797 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 15 ms
7,784 KB
testcase_03 WA -
testcase_04 AC 15 ms
7,704 KB
testcase_05 WA -
testcase_06 AC 15 ms
7,804 KB
testcase_07 AC 14 ms
7,880 KB
testcase_08 AC 15 ms
7,828 KB
testcase_09 WA -
testcase_10 AC 15 ms
7,788 KB
testcase_11 AC 15 ms
7,952 KB
testcase_12 AC 15 ms
7,904 KB
testcase_13 AC 14 ms
7,848 KB
testcase_14 AC 15 ms
7,872 KB
testcase_15 AC 15 ms
7,784 KB
testcase_16 AC 14 ms
7,960 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 15 ms
7,768 KB
testcase_22 WA -
testcase_23 AC 15 ms
7,840 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

r, b = map(int, input().split())
rgw = input()

d = list(rgw)

i = 0
while(1):
    if i >= len(d):
        break
    if d[i] == 'R':
        while(len(d)>  i + r and d[i + r] == 'R'):
            del(d[i + r])
    if d[i] == 'B':
        while(len(d)> i + b and d[i + b] == 'B'):
            del(d[i + b])
    i += 1
print(len(d))
0