結果
| 問題 |
No.1005 BOT対策
|
| コンテスト | |
| ユーザー |
brthyyjp
|
| 提出日時 | 2020-03-06 22:32:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 305 bytes |
| コンパイル時間 | 214 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 64,256 KB |
| 最終ジャッジ日時 | 2024-10-14 10:48:02 |
| 合計ジャッジ時間 | 3,088 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 3 |
ソースコード
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])
#print(s_)
ans = len(m) + len(re.findall(s_, t))
print(ans)
else:
print(len(m))
brthyyjp