結果

問題 No.345 最小チワワ問題
コンテスト
ユーザー 2329 N
提出日時 2020-09-08 22:22:20
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 209 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 56 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 13,440 KB
最終ジャッジ日時 2026-10-02 13:02:40
合計ジャッジ時間 2,592 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 WA * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

s = input()
l = list(s)
del l[:l.index('c')]

if l.count('c') >= 1 and l.count('w') >= 2 and l.index('c') < l.index('w'):
    l.remove('w')
    print(len(l[l.index('c'):l.index('w')]) + 2)
else:
    print(-1)
0