結果

問題 No.345 最小チワワ問題
ユーザー akitsugu777
提出日時 2018-10-16 17:12:40
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-12 18:42:57
合計ジャッジ時間 2,080 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()

if 'c' in s:
    x = s.index('c')
    t = s[x+1:]
    if 'w' in t:
        y = t.index('w')
        u = t[y+1:]
        if 'w' in u:
            z = u.index('w')
            print(x+y+z+3-x)
        else:
            print(-1)
    else:
        print(-1)
else:
    print(-1)
0