結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
uni_python
|
| 提出日時 | 2020-07-15 23:50:20 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 61 ms / 2,000 ms |
| + 710µs | |
| コード長 | 463 bytes |
| 記録 | |
| コンパイル時間 | 243 ms |
| コンパイル使用メモリ | 96,620 KB |
| 実行使用メモリ | 82,604 KB |
| 最終ジャッジ日時 | 2026-07-12 08:28:38 |
| 合計ジャッジ時間 | 3,861 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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()
uni_python