結果

問題 No.1005 BOT対策
ユーザー hiragn
提出日時 2022-11-19 22:16:36
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-21 03:24:00
合計ジャッジ時間 2,117 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 23 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    s = input()
    t = input()

    if len(t) == 1 and t in s:
        exit(print(-1))

    ans = 0
    for i in range(len(s) - len(t) + 1):
        if s[i:i + len(t)] == t:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()
0