結果

問題 No.1005 BOT対策
コンテスト
ユーザー lemon
提出日時 2021-05-02 17:07:23
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
WA  
実行時間 -
コード長 183 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 105 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-21 02:07:22
合計ジャッジ時間 2,145 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

s = input()
t = input()

ans = s.count(t)

if len(t) == 1 and ans != 0:
    ans = -1

else:
    if len(set(t)) == 1 and len(set(s)) == 1:
        ans = len(s) - len(t) + 1

print(ans)
0