結果
問題 | No.1005 BOT対策 |
ユーザー |
![]() |
提出日時 | 2025-03-20 21:20:38 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 413 bytes |
コンパイル時間 | 165 ms |
コンパイル使用メモリ | 82,336 KB |
実行使用メモリ | 53,964 KB |
最終ジャッジ日時 | 2025-03-20 21:21:48 |
合計ジャッジ時間 | 2,504 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 WA * 8 |
ソースコード
S = input().strip()T = input().strip()m = len(T)n = len(S)matches = []for i in range(n - m + 1):if S[i:i+m] == T:start = iend = i + m - 1matches.append((start, end))if not matches:print(0)else:matches.sort(key=lambda x: x[1])count = 0last = -1for s, e in matches:if s > last:count += 1last = eprint(count)