結果

問題 No.345 最小チワワ問題
ユーザー tabataba
提出日時 2016-04-13 08:02:10
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 174 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-15 00:38:08
合計ジャッジ時間 1,676 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

s=raw_input()
c=-1
w=-1
l=[]
for i in range(len(s)):
	if s[i]=="c":
		c=i
	if s[i]=="w":
		if c<w:
			l+=[i-c+1]
			w=-1
		else:
			w=i
	#print s[i],c,w
#print l
print min(l)
0