結果
問題 | No.345 最小チワワ問題 |
ユーザー | taba |
提出日時 | 2016-04-13 23:05:11 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 11 ms / 2,000 ms |
コード長 | 176 bytes |
コンパイル時間 | 188 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-09-25 11:42:28 |
合計ジャッジ時間 | 1,318 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
s=raw_input() l=[] for i in range(len(s)): if s[i]=="c": w=s.find("w",i) if w>0: w=s.find("w",w+1) if w>0: l+=[w-i+1] if len(l)==0: print -1 else: print min(l)