結果
問題 |
No.1005 BOT対策
|
ユーザー |
![]() |
提出日時 | 2020-07-15 23:50:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 463 bytes |
コンパイル時間 | 189 ms |
コンパイル使用メモリ | 82,696 KB |
実行使用メモリ | 54,520 KB |
最終ジャッジ日時 | 2025-06-20 00:53:34 |
合計ジャッジ時間 | 2,524 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): mod=10**9+7 S=list(input()) T=list(input()) ns=len(S) nt=len(T) if nt==1 and T[0] in S: print(-1) exit() cnt=0 for i in range(ns-nt+1): if S[i:i+nt]==T: S[i+nt-2]="_" cnt+=1 print(cnt) main()