結果

問題 No.345 最小チワワ問題
ユーザー kokoa1046
提出日時 2017-09-24 22:05:01
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 187 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-14 07:31:50
合計ジャッジ時間 2,225 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 WA * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

str = input()
n =str.index('c')
if str.count('c')>=1 and str[str.index('c'):].count('w')>=2:
    n2 =str.index('w',str.index('w',str.index('c')+1)+1)
    print(n2-n+1)
else:
    print(-1)
0