結果

問題 No.1005 BOT対策
ユーザー miya145592miya145592
提出日時 2023-05-19 01:20:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 1,052 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 75,828 KB
最終ジャッジ日時 2023-08-22 14:34:34
合計ジャッジ時間 4,125 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,116 KB
testcase_01 AC 72 ms
71,236 KB
testcase_02 AC 73 ms
71,380 KB
testcase_03 AC 72 ms
71,208 KB
testcase_04 AC 72 ms
71,372 KB
testcase_05 AC 72 ms
71,380 KB
testcase_06 AC 73 ms
71,432 KB
testcase_07 AC 72 ms
71,440 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 71 ms
71,452 KB
testcase_11 WA -
testcase_12 AC 73 ms
71,336 KB
testcase_13 WA -
testcase_14 AC 75 ms
75,780 KB
testcase_15 AC 73 ms
71,372 KB
testcase_16 WA -
testcase_17 AC 73 ms
71,436 KB
testcase_18 WA -
testcase_19 AC 72 ms
71,336 KB
testcase_20 AC 73 ms
71,424 KB
testcase_21 AC 72 ms
71,392 KB
testcase_22 AC 71 ms
71,116 KB
testcase_23 AC 73 ms
71,336 KB
testcase_24 AC 76 ms
75,780 KB
testcase_25 AC 75 ms
75,628 KB
testcase_26 WA -
testcase_27 AC 73 ms
71,260 KB
testcase_28 AC 78 ms
75,828 KB
testcase_29 AC 74 ms
71,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
T = input()
if len(T)==1:
    print(-1)
    exit()
i = 0
j = 0
cnt = 0
while i<len(S):
    if S[i]!=T[j]:
        i+=1
        j=0
    else:
        if j==len(T)-1:
            cnt+=1
            j=0
        else:
            i+=1
            j+=1
print(cnt)
0