結果
| 問題 | 
                            No.1005 BOT対策
                             | 
                    
| コンテスト | |
| ユーザー | 
                             brthyyjp
                         | 
                    
| 提出日時 | 2020-03-06 22:36:59 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 305 bytes | 
| コンパイル時間 | 152 ms | 
| コンパイル使用メモリ | 82,308 KB | 
| 実行使用メモリ | 65,256 KB | 
| 最終ジャッジ日時 | 2024-10-14 10:49:27 | 
| 合計ジャッジ時間 | 2,772 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 25 WA * 2 | 
ソースコード
s = str(input())
t = str(input())
import re
m = re.findall(t, s)
#print(m)
if len(t) == 1:
    if len(m) == 0:
        print(0)
    else:
        print(-1)
elif t == t[0]*len(t):
    s_ = s.replace(t, t[0])
    #print(s_)
    ans = len(m) + len(re.findall(t, s_))
    print(ans)
else:
    print(len(m))
            
            
            
        
            
brthyyjp