結果
| 問題 |
No.1005 BOT対策
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-04 18:46:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 327 bytes |
| コンパイル時間 | 164 ms |
| コンパイル使用メモリ | 82,456 KB |
| 実行使用メモリ | 71,140 KB |
| 最終ジャッジ日時 | 2024-09-19 07:06:59 |
| 合計ジャッジ時間 | 6,589 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 2 |
| other | -- * 27 |
ソースコード
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 1:
try:
if s[pos:pos + n] == t:
ans += 1
pos = pos + n - 1
else:
pos += 1
except IndexError:
break
print(ans)