結果

問題 No.1005 BOT対策
ユーザー brthyyjpbrthyyjp
提出日時 2020-03-06 22:45:36
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 325 bytes
コンパイル時間 476 ms
コンパイル使用メモリ 87,280 KB
実行使用メモリ 80,032 KB
最終ジャッジ日時 2023-08-04 13:52:39
合計ジャッジ時間 5,858 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 144 ms
80,024 KB
testcase_01 AC 144 ms
79,684 KB
testcase_02 AC 144 ms
79,688 KB
testcase_03 AC 143 ms
79,824 KB
testcase_04 AC 146 ms
79,952 KB
testcase_05 AC 142 ms
79,896 KB
testcase_06 AC 140 ms
79,916 KB
testcase_07 AC 141 ms
79,616 KB
testcase_08 AC 141 ms
79,888 KB
testcase_09 AC 146 ms
79,960 KB
testcase_10 AC 146 ms
79,620 KB
testcase_11 AC 146 ms
79,840 KB
testcase_12 AC 147 ms
79,684 KB
testcase_13 AC 144 ms
79,628 KB
testcase_14 AC 144 ms
79,792 KB
testcase_15 AC 143 ms
79,752 KB
testcase_16 AC 144 ms
79,736 KB
testcase_17 AC 147 ms
79,844 KB
testcase_18 AC 144 ms
79,852 KB
testcase_19 AC 145 ms
79,828 KB
testcase_20 AC 144 ms
79,840 KB
testcase_21 AC 144 ms
79,828 KB
testcase_22 AC 145 ms
79,900 KB
testcase_23 AC 142 ms
79,756 KB
testcase_24 AC 142 ms
79,796 KB
testcase_25 AC 142 ms
79,576 KB
testcase_26 AC 144 ms
79,796 KB
testcase_27 AC 147 ms
80,032 KB
testcase_28 AC 146 ms
79,852 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