結果

問題 No.345 最小チワワ問題
ユーザー a_tena_ten
提出日時 2016-03-07 20:51:18
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 265 bytes
コンパイル時間 745 ms
コンパイル使用メモリ 7,116 KB
実行使用メモリ 6,436 KB
最終ジャッジ日時 2023-10-24 20:15:29
合計ジャッジ時間 1,986 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
6,428 KB
testcase_01 AC 9 ms
6,428 KB
testcase_02 AC 9 ms
6,428 KB
testcase_03 AC 10 ms
6,428 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 10 ms
6,428 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 WA -
testcase_15 AC 10 ms
6,428 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 10 ms
6,428 KB
testcase_20 AC 10 ms
6,428 KB
testcase_21 AC 10 ms
6,428 KB
testcase_22 AC 10 ms
6,428 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 10 ms
6,428 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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)
0