結果
問題 |
No.1005 BOT対策
|
ユーザー |
![]() |
提出日時 | 2020-05-02 13:06:55 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 387 bytes |
コンパイル時間 | 225 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 21,120 KB |
最終ジャッジ日時 | 2024-12-29 18:20:40 |
合計ジャッジ時間 | 20,343 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 TLE * 6 |
ソースコード
def main(): s = input() t = input() ans = solve(s, t) print(ans) def solve(s, t): ls, lt = len(s), len(t) if ls < lt: return 0 ans = 0 i = 0 while i < ls - lt + 1: if s[i:i + lt] == t: ans += 1 i += lt - 1 else: i += 1 return ans return ans if __name__ == '__main__': main()