結果

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

ソースコード

diff #

import re

S = input()
k = 100000000000000000000

ans = re.findall("[c]+[^w]*[w]+[^w]*[w]",S)
flg = 0
if ans == []:
    print("-1")
    flg = 1
else:
    for i in ans:
        if len(i) < k:
            k = len(i)

if flg == 0:
    print(k)
0