結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2025-12-03 15:13:55 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 36 ms / 2,000 ms |
| + 587µs | |
| コード長 | 436 bytes |
| 記録 | |
| コンパイル時間 | 100 ms |
| コンパイル使用メモリ | 64,472 KB |
| 実行使用メモリ | 53,788 KB |
| 最終ジャッジ日時 | 2026-11-06 03:03:38 |
| 合計ジャッジ時間 | 3,430 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 |
ソースコード
import sys
import math
def input(): return sys.stdin.readline().rstrip('\n')
def main():
s = input()
t = input()
if len(t) == 1:
if s.find(t) == -1: return 0
return -1
cnt = 0
while True:
idx = s.find(t)
if idx == -1:
return cnt
s = s[idx + len(t) - 1:]
cnt += 1
if __name__ == '__main__':
ret = main()
if ret is not None:
print(ret)