結果

問題 No.1313 N言っちゃダメゲーム (4)
ユーザー titiatitia
提出日時 2020-12-15 06:49:39
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 221 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 11,696 KB
実行使用メモリ 10,332 KB
最終ジャッジ日時 2023-10-20 05:45:12
合計ジャッジ時間 2,554 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
9,952 KB
testcase_01 AC 36 ms
9,952 KB
testcase_02 AC 28 ms
9,952 KB
testcase_03 AC 28 ms
9,952 KB
testcase_04 AC 27 ms
9,952 KB
testcase_05 AC 27 ms
9,952 KB
testcase_06 AC 28 ms
9,952 KB
testcase_07 AC 27 ms
9,952 KB
testcase_08 AC 27 ms
9,952 KB
testcase_09 AC 27 ms
9,952 KB
testcase_10 AC 29 ms
9,952 KB
testcase_11 AC 27 ms
9,952 KB
testcase_12 AC 28 ms
9,952 KB
testcase_13 AC 72 ms
10,332 KB
testcase_14 AC 62 ms
10,332 KB
testcase_15 AC 30 ms
10,332 KB
testcase_16 AC 29 ms
10,332 KB
testcase_17 AC 54 ms
10,332 KB
testcase_18 AC 28 ms
10,092 KB
testcase_19 AC 28 ms
10,172 KB
testcase_20 AC 28 ms
10,000 KB
testcase_21 AC 28 ms
10,092 KB
testcase_22 AC 28 ms
10,076 KB
testcase_23 AC 28 ms
10,092 KB
testcase_24 AC 28 ms
10,012 KB
testcase_25 AC 29 ms
10,092 KB
testcase_26 AC 28 ms
9,956 KB
testcase_27 AC 28 ms
10,104 KB
testcase_28 AC 29 ms
10,332 KB
testcase_29 AC 28 ms
10,332 KB
testcase_30 AC 28 ms
10,332 KB
testcase_31 AC 29 ms
10,332 KB
testcase_32 AC 28 ms
10,332 KB
testcase_33 AC 50 ms
10,332 KB
testcase_34 AC 48 ms
10,332 KB
testcase_35 AC 73 ms
10,332 KB
testcase_36 AC 61 ms
10,332 KB
testcase_37 AC 59 ms
10,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
S=input()
NOW=N-2

while True:
    while NOW>=0 and S[NOW]=="x":
        NOW-=1
        
    if NOW>=K:
        NOW-=K+1
    else:
        break

if NOW<0:
    print(0)
else:
    print(NOW+1)
0