結果
| 問題 | 
                            No.1005 BOT対策
                             | 
                    
| コンテスト | |
| ユーザー | 
                             knk_kei
                         | 
                    
| 提出日時 | 2021-02-03 02:04:38 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 375 bytes | 
| コンパイル時間 | 192 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,624 KB | 
| 最終ジャッジ日時 | 2024-06-30 00:05:39 | 
| 合計ジャッジ時間 | 1,919 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 WA * 6 | 
ソースコード
s = input()
t = input()
"""
sに連続列としてtが含まれないようにしたい
何個.が必要?
tの数を純粋に数えるとs=aaaaaaa,t=aaaみたいな時に辛い。
尺取みたいにする
"""
idx = 0
ans = 0
lt, ls = len(t), len(s)
while idx + lt <= ls:
    if s[idx : idx + lt] == t:
        ans += 1
        idx += max(lt - 2, 0)
    idx += 1
print(ans)
            
            
            
        
            
knk_kei