結果

問題 No.1005 BOT対策
ユーザー miya145592miya145592
提出日時 2023-05-19 01:23:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 309 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 87,300 KB
実行使用メモリ 75,620 KB
最終ジャッジ日時 2023-08-22 14:35:19
合計ジャッジ時間 3,800 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,192 KB
testcase_01 AC 72 ms
71,088 KB
testcase_02 AC 67 ms
71,148 KB
testcase_03 AC 69 ms
71,096 KB
testcase_04 AC 68 ms
71,236 KB
testcase_05 AC 69 ms
71,204 KB
testcase_06 AC 68 ms
71,096 KB
testcase_07 AC 69 ms
71,148 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 68 ms
71,264 KB
testcase_11 AC 68 ms
71,320 KB
testcase_12 AC 69 ms
71,104 KB
testcase_13 AC 68 ms
71,328 KB
testcase_14 AC 72 ms
75,512 KB
testcase_15 AC 69 ms
71,312 KB
testcase_16 AC 68 ms
71,024 KB
testcase_17 AC 69 ms
71,360 KB
testcase_18 WA -
testcase_19 AC 71 ms
71,276 KB
testcase_20 AC 69 ms
71,392 KB
testcase_21 AC 67 ms
71,260 KB
testcase_22 AC 68 ms
71,336 KB
testcase_23 AC 68 ms
71,024 KB
testcase_24 AC 72 ms
75,568 KB
testcase_25 AC 73 ms
75,456 KB
testcase_26 AC 73 ms
75,556 KB
testcase_27 AC 69 ms
71,336 KB
testcase_28 AC 74 ms
75,620 KB
testcase_29 AC 70 ms
71,212 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]:
        if j==0:
            i+=1
        else:
            j=0
    else:
        if j==len(T)-1:
            cnt+=1
            j=0
        else:
            i+=1
            j+=1
print(cnt)
0