結果
問題 | No.1005 BOT対策 |
ユーザー |
|
提出日時 | 2021-05-02 17:17:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 406 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-21 02:18:28 |
合計ジャッジ時間 | 2,146 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 13 WA * 14 |
ソースコード
s = input() t = input() ans = s.count(t) if ans: if len(t) == 1: ans = -1 else: ls = len(s) lt = len(t) ans = 0 i = 0 while lt > ls: j = i + lt if s[i:j] == t: ans += -1 ls -= lt - 1 i = j else: i += -1 ls -= 1 print(ans)