結果

問題 No.341 沈黙の期間
ユーザー taktak
提出日時 2018-08-10 00:13:47
言語 F#
(F# 4.0)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 386 bytes
コンパイル時間 12,406 ms
コンパイル使用メモリ 190,560 KB
実行使用メモリ 31,572 KB
最終ジャッジ日時 2023-10-24 12:58:21
合計ジャッジ時間 14,329 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
31,572 KB
testcase_01 AC 57 ms
31,568 KB
testcase_02 AC 58 ms
31,572 KB
testcase_03 AC 58 ms
31,572 KB
testcase_04 AC 57 ms
31,572 KB
testcase_05 AC 57 ms
31,572 KB
testcase_06 AC 57 ms
31,564 KB
testcase_07 AC 59 ms
31,564 KB
testcase_08 AC 57 ms
31,564 KB
testcase_09 AC 57 ms
31,564 KB
testcase_10 AC 58 ms
31,552 KB
testcase_11 AC 57 ms
31,564 KB
testcase_12 AC 57 ms
31,552 KB
testcase_13 AC 57 ms
31,572 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (750 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

let f (str : string) =
    let chain = 
        let detect c = c = '…'
        Array.unfold(fun (i, p) -> 
            if i < str.Length then 
                let chain = if detect <| str.[i] then p + 1 else 0
                Some(chain, (i + 1, chain))
            else 
                None
        ) (0, 0)
    chain |> Array.max

let S = stdin.ReadLine()

f S |> stdout.WriteLine
0