結果

問題 No.1005 BOT対策
ユーザー futago0118futago0118
提出日時 2020-07-10 20:58:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 264 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-19 15:07:10
合計ジャッジ時間 1,792 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,496 KB
testcase_01 AC 28 ms
10,624 KB
testcase_02 AC 27 ms
10,624 KB
testcase_03 AC 25 ms
10,496 KB
testcase_04 RE -
testcase_05 AC 26 ms
10,496 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 26 ms
10,496 KB
testcase_11 AC 27 ms
10,496 KB
testcase_12 AC 26 ms
10,496 KB
testcase_13 AC 26 ms
10,496 KB
testcase_14 AC 29 ms
10,496 KB
testcase_15 AC 25 ms
10,624 KB
testcase_16 AC 25 ms
10,496 KB
testcase_17 AC 25 ms
10,496 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 26 ms
10,496 KB
testcase_22 AC 26 ms
10,624 KB
testcase_23 AC 25 ms
10,368 KB
testcase_24 AC 25 ms
10,496 KB
testcase_25 AC 26 ms
10,496 KB
testcase_26 AC 26 ms
10,624 KB
testcase_27 RE -
testcase_28 AC 26 ms
10,496 KB
testcase_29 AC 25 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
BOT = input()

if len(BOT) == 1 and ans != 0:
    print("-1")
elif len(BOT) == 2 and BOT[0]==BOT[1]:
    cnt = 0
    for i in range(len(S)-len(BOT)+1):
        if S[i:i+len(BOT)] == BOT:
            cnt += 1
    print(cnt)
else:
    print(S.count(BOT))
0