結果
| 問題 | No.345 最小チワワ問題 |
| コンテスト | |
| ユーザー |
a_ten
|
| 提出日時 | 2016-03-07 20:51:18 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 265 bytes |
| 記録 | |
| コンパイル時間 | 140 ms |
| コンパイル使用メモリ | 77,268 KB |
| 最終ジャッジ日時 | 2025-12-03 19:36:31 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 14 RE * 7 |
ソースコード
#coding:utf-8
str=raw_input()
cww=str[str.index('c'):]
c_w=list(cww[:cww.index('w')+1])
s=[]
for i in cww[cww.index('w')+1:]:
if 'w' not in i:
s.append(i)
else:
s.append('w')
break
if not c_w or not s or 'w' not in s:
print -1
else:
print len(c_w + s)
a_ten