結果

問題 No.345 最小チワワ問題
ユーザー chike_pluschike_plus
提出日時 2019-04-02 17:45:11
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 435 bytes
コンパイル時間 3,326 ms
コンパイル使用メモリ 160,888 KB
実行使用メモリ 29,600 KB
最終ジャッジ日時 2023-08-20 12:15:07
合計ジャッジ時間 7,435 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
25,552 KB
testcase_01 AC 98 ms
23,688 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 97 ms
25,920 KB
testcase_05 AC 98 ms
27,788 KB
testcase_06 AC 96 ms
25,736 KB
testcase_07 AC 91 ms
25,520 KB
testcase_08 AC 90 ms
25,612 KB
testcase_09 AC 92 ms
27,624 KB
testcase_10 AC 97 ms
25,856 KB
testcase_11 AC 91 ms
23,480 KB
testcase_12 AC 96 ms
29,600 KB
testcase_13 AC 89 ms
27,532 KB
testcase_14 AC 95 ms
27,836 KB
testcase_15 AC 97 ms
25,920 KB
testcase_16 AC 96 ms
23,748 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 99 ms
25,804 KB
testcase_20 AC 100 ms
25,800 KB
testcase_21 AC 101 ms
25,780 KB
testcase_22 AC 98 ms
25,608 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 96 ms
25,652 KB
testcase_29 AC 94 ms
25,900 KB
testcase_30 AC 93 ms
25,764 KB
testcase_31 AC 90 ms
27,648 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System.Text.RegularExpressions
let ``No.345 最小チワワ問題``() =
  
  let s = stdin.ReadLine()

  let regCWW = Regex("(c[abdefghijklmnopqrstuvxyz]*w[abdefghijklmnopqrstuvxyz]*w)")
  match regCWW.IsMatch s with
  | false -> -1 |> stdout.WriteLine
  | true  -> 
    seq { for g in regCWW.Matches(s).[0].Groups do yield g.Value.Length }
    |> Seq.minBy (fun s -> s)
    |> stdout.WriteLine

``No.345 最小チワワ問題``()
0