結果
| 問題 | 
                            No.1005 BOT対策
                             | 
                    
| コンテスト | |
| ユーザー | 
                             googol_S0
                         | 
                    
| 提出日時 | 2020-03-06 21:35:56 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 236 bytes | 
| コンパイル時間 | 175 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-10-14 10:26:03 | 
| 合計ジャッジ時間 | 2,050 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 2 | 
| other | AC * 14 WA * 13 | 
ソースコード
import sys
S=input()
T=input()
if len(T)==1 and T in S:
  print('-1')
  sys.exit()
if not(T in S):
  print(0)
  sys.exit()
L=len(S)
M=len(T)
i=0
P=0
while M-L+1>i:
  if S[i:i+M]==T:
    S=S[:i+M-1]+'.'+S[i+M:]
    P=P+1
  i=i+1
print(P)
            
            
            
        
            
googol_S0