結果
| 問題 | 
                            No.1005 BOT対策
                             | 
                    
| コンテスト | |
| ユーザー | 
                             s_shohei
                         | 
                    
| 提出日時 | 2020-04-11 14:29:14 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 357 bytes | 
| コンパイル時間 | 193 ms | 
| コンパイル使用メモリ | 82,176 KB | 
| 実行使用メモリ | 52,224 KB | 
| 最終ジャッジ日時 | 2024-09-19 00:53:11 | 
| 合計ジャッジ時間 | 2,757 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 23 WA * 4 | 
ソースコード
s=input()
t=input()
if len(t)==1 and s.count(t)>0:
    print(-1)
    exit()
t_now=0
ans=0
for i in range(len(s)):
    if s[i] == t[t_now]:
        if t_now+1 == len(t):
            ans+=1
            if t[-1] == t[0]:
                t_now=1
            else:
                t_now=0
        else:
            t_now+=1
    else:
        t_now=0
print(ans)
            
            
            
        
            
s_shohei