結果
問題 | No.1005 BOT対策 |
ユーザー |
![]() |
提出日時 | 2020-03-06 22:45:36 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 325 bytes |
コンパイル時間 | 623 ms |
コンパイル使用メモリ | 81,968 KB |
実行使用メモリ | 64,256 KB |
最終ジャッジ日時 | 2024-10-14 10:49:18 |
合計ジャッジ時間 | 2,968 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 WA * 1 |
ソースコード
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))