結果
| 問題 |
No.1005 BOT対策
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-21 21:05:41 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 275 bytes |
| コンパイル時間 | 145 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-21 21:05:44 |
| 合計ジャッジ時間 | 2,474 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 3 |
ソースコード
s = input()
t = input()
n = len(s)
m = len(t)
ans = 0
if len(t) == 1:
print(-1)
elif t not in s:
print(0)
else:
l = 0
while l + m <= n:
if s[l:l+m] == t:
ans += 1
l = l + m - 1
else:
l += 1
print(ans)