結果

問題 No.1005 BOT対策
ユーザー brthyyjpbrthyyjp
提出日時 2020-03-06 22:45:36
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 325 bytes
コンパイル時間 471 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 64,640 KB
最終ジャッジ日時 2024-04-22 11:29:59
合計ジャッジ時間 3,159 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
63,104 KB
testcase_01 AC 56 ms
62,464 KB
testcase_02 AC 55 ms
62,848 KB
testcase_03 AC 59 ms
62,336 KB
testcase_04 AC 54 ms
62,848 KB
testcase_05 AC 55 ms
62,848 KB
testcase_06 AC 56 ms
62,848 KB
testcase_07 AC 56 ms
62,336 KB
testcase_08 AC 57 ms
63,360 KB
testcase_09 AC 56 ms
62,848 KB
testcase_10 AC 57 ms
63,744 KB
testcase_11 AC 55 ms
62,720 KB
testcase_12 AC 56 ms
62,848 KB
testcase_13 AC 56 ms
62,848 KB
testcase_14 AC 55 ms
62,592 KB
testcase_15 AC 55 ms
63,488 KB
testcase_16 AC 55 ms
63,360 KB
testcase_17 AC 58 ms
64,640 KB
testcase_18 AC 55 ms
62,592 KB
testcase_19 AC 55 ms
62,976 KB
testcase_20 AC 55 ms
62,848 KB
testcase_21 AC 61 ms
64,256 KB
testcase_22 AC 58 ms
64,384 KB
testcase_23 AC 57 ms
63,104 KB
testcase_24 AC 55 ms
62,720 KB
testcase_25 AC 55 ms
62,336 KB
testcase_26 AC 56 ms
62,592 KB
testcase_27 AC 56 ms
63,488 KB
testcase_28 AC 57 ms
63,360 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

s = str(input())
t = str(input())

import re
m = re.findall(t, s)
#print(m)

if len(t) == 1:
    if len(m) == 0:
        print(0)
    else:
        print(-1)
elif t == t[0]*len(t):
    s_ = s.replace(t, t[0]*(len(t)-1)+'.'+t[0])
    #print(s_)
    ans = len(m) + len(re.findall(t, s_))
    print(ans)
else:
    print(len(m))
0