結果

問題 No.1005 BOT対策
ユーザー pluto77pluto77
提出日時 2020-03-08 15:17:50
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
RE  
実行時間 -
コード長 196 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 10,524 KB
実行使用メモリ 7,984 KB
最終ジャッジ日時 2023-08-07 02:40:31
合計ジャッジ時間 1,988 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,796 KB
testcase_01 AC 16 ms
7,832 KB
testcase_02 AC 16 ms
7,796 KB
testcase_03 AC 16 ms
7,820 KB
testcase_04 RE -
testcase_05 AC 16 ms
7,944 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 16 ms
7,772 KB
testcase_09 AC 15 ms
7,812 KB
testcase_10 AC 16 ms
7,868 KB
testcase_11 AC 16 ms
7,760 KB
testcase_12 AC 16 ms
7,760 KB
testcase_13 AC 16 ms
7,768 KB
testcase_14 AC 15 ms
7,788 KB
testcase_15 AC 16 ms
7,792 KB
testcase_16 AC 16 ms
7,872 KB
testcase_17 AC 15 ms
7,792 KB
testcase_18 AC 16 ms
7,876 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 16 ms
7,696 KB
testcase_22 AC 15 ms
7,816 KB
testcase_23 AC 16 ms
7,792 KB
testcase_24 AC 15 ms
7,776 KB
testcase_25 AC 16 ms
7,788 KB
testcase_26 AC 16 ms
7,836 KB
testcase_27 RE -
testcase_28 AC 16 ms
7,792 KB
testcase_29 AC 16 ms
7,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1005
s=input()
t=input()
if len(t)==1 and t in s:
 print(-1)
else:
 res=0
 cnt=0
 while len(t)+cnt<=len(s):
  if s[cnt:cnt+len(t)]==t:
   res+=1
   cnt+=len(t)-1
  else:
   cnt+=1
print(res)
0