結果

問題 No.1005 BOT対策
ユーザー knk_kei
提出日時 2021-02-03 02:01:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 373 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2024-06-30 00:05:30
合計ジャッジ時間 3,888 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 TLE * 1 -- * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
t = input()
"""
sに連続列としてtが含まれないようにしたい
何個.が必要?
tの数を純粋に数えるとs=aaaaaaa,t=aaaみたいな時に辛い。
尺取みたいにする
"""
idx = 0
ans = 0
while idx + len(t) <= len(s):
    if s[idx : idx + len(t)] == t:
        ans += 1
        idx += len(t) - 1
    else:
        idx += 1
print(ans)
0