結果

問題 No.345 最小チワワ問題
ユーザー Maboy
提出日時 2018-02-18 12:19:02
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 144 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-06-24 12:42:34
合計ジャッジ時間 2,031 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

s=input()
p=0
q=set()
w=""
for i in "cww":
  p=s.find(i,p)
  if p<0:break
  q.add(p)
  w+=s[p]
  p+=1
print(max(q)-min(q)+1 if w=='cww' else -1)
0