結果
| 問題 |
No.1005 BOT対策
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-04 18:51:16 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 2,000 ms |
| コード長 | 279 bytes |
| コンパイル時間 | 140 ms |
| コンパイル使用メモリ | 11,904 KB |
| 実行使用メモリ | 10,112 KB |
| 最終ジャッジ日時 | 2025-06-20 00:53:21 |
| 合計ジャッジ時間 | 2,195 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
s = input()
t = input()
if len(t) == 1:
if t in s:
print(-1)
else:
print(0)
exit()
ans = 0
pos = 0
n = len(t)
while pos + n <= len(s):
if s[pos:pos + n] == t:
ans += 1
pos += n - 1
else:
pos += 1
print(ans)
exit()