結果

問題 No.1313 N言っちゃダメゲーム (4)
ユーザー Kiri8128Kiri8128
提出日時 2020-12-10 00:16:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 210 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 81,524 KB
実行使用メモリ 76,072 KB
最終ジャッジ日時 2023-10-19 10:33:59
合計ジャッジ時間 3,641 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,320 KB
testcase_01 AC 40 ms
53,320 KB
testcase_02 AC 39 ms
53,320 KB
testcase_03 AC 39 ms
53,320 KB
testcase_04 WA -
testcase_05 AC 39 ms
53,320 KB
testcase_06 WA -
testcase_07 AC 40 ms
53,320 KB
testcase_08 AC 39 ms
53,320 KB
testcase_09 AC 38 ms
53,320 KB
testcase_10 WA -
testcase_11 AC 40 ms
53,320 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 56 ms
73,844 KB
testcase_16 AC 58 ms
73,860 KB
testcase_17 AC 64 ms
73,920 KB
testcase_18 AC 52 ms
68,684 KB
testcase_19 AC 52 ms
68,304 KB
testcase_20 AC 45 ms
60,240 KB
testcase_21 AC 49 ms
65,096 KB
testcase_22 AC 48 ms
63,796 KB
testcase_23 WA -
testcase_24 AC 46 ms
59,796 KB
testcase_25 AC 54 ms
68,652 KB
testcase_26 AC 45 ms
59,528 KB
testcase_27 AC 52 ms
66,924 KB
testcase_28 WA -
testcase_29 AC 59 ms
73,888 KB
testcase_30 WA -
testcase_31 AC 59 ms
73,888 KB
testcase_32 AC 59 ms
75,944 KB
testcase_33 AC 59 ms
76,068 KB
testcase_34 AC 62 ms
76,072 KB
testcase_35 AC 58 ms
73,872 KB
testcase_36 AC 59 ms
76,072 KB
testcase_37 AC 59 ms
76,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
N -= 1
S = [0] + [1 if a == "x" else 0 for a in input()]
X = [0] * N + [1]
l = N
for i in range(N)[::-1]:
    if l - i > K and S[i] == 0:
        X[i] = 1
        l = i
print(l)
0