結果

問題 No.345 最小チワワ問題
ユーザー miya145592miya145592
提出日時 2023-05-03 16:23:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 166 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 82,112 KB
実行使用メモリ 65,032 KB
最終ジャッジ日時 2024-05-01 14:25:54
合計ジャッジ時間 3,345 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
62,952 KB
testcase_01 AC 57 ms
63,520 KB
testcase_02 AC 57 ms
63,480 KB
testcase_03 AC 58 ms
63,440 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 60 ms
63,524 KB
testcase_08 AC 60 ms
63,292 KB
testcase_09 AC 59 ms
62,960 KB
testcase_10 AC 59 ms
64,356 KB
testcase_11 AC 58 ms
63,984 KB
testcase_12 AC 58 ms
63,632 KB
testcase_13 AC 57 ms
63,932 KB
testcase_14 WA -
testcase_15 AC 58 ms
63,288 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 58 ms
63,088 KB
testcase_20 AC 59 ms
63,720 KB
testcase_21 AC 57 ms
64,224 KB
testcase_22 AC 58 ms
63,864 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 58 ms
64,232 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 58 ms
64,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import re
S = input()
a = re.findall('c.*?w.*?w', S)
if len(a)==0:
    print(-1)
else:
    ans = 10**9
    for aa in a:
        ans = min(ans, len(aa))
    print(ans)
0