結果

問題 No.279 木の数え上げ
ユーザー chike_pluschike_plus
提出日時 2019-03-27 09:54:40
言語 F#
(F# 4.0)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 435 bytes
コンパイル時間 6,612 ms
コンパイル使用メモリ 186,176 KB
実行使用メモリ 37,248 KB
最終ジャッジ日時 2024-04-19 09:42:05
合計ジャッジ時間 9,571 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
29,952 KB
testcase_01 AC 60 ms
30,204 KB
testcase_02 AC 61 ms
29,952 KB
testcase_03 AC 61 ms
29,952 KB
testcase_04 AC 60 ms
29,952 KB
testcase_05 AC 61 ms
30,336 KB
testcase_06 AC 61 ms
30,080 KB
testcase_07 AC 60 ms
30,204 KB
testcase_08 AC 61 ms
30,080 KB
testcase_09 AC 60 ms
30,080 KB
testcase_10 AC 83 ms
36,860 KB
testcase_11 AC 72 ms
31,744 KB
testcase_12 AC 84 ms
35,584 KB
testcase_13 AC 70 ms
31,188 KB
testcase_14 AC 86 ms
37,248 KB
testcase_15 AC 83 ms
36,352 KB
testcase_16 AC 83 ms
35,968 KB
testcase_17 AC 85 ms
36,736 KB
testcase_18 AC 77 ms
33,664 KB
testcase_19 AC 85 ms
36,708 KB
testcase_20 AC 85 ms
36,864 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (219 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let ``No.279 木の数え上げ``() =

  stdin.ReadLine()
  |> Seq.filter (fun id -> (id = 't' || id = 'r' || id = 'e'))
  |> Seq.countBy (fun id -> id)
  |> Seq.minBy (fun (id , n) -> 
    match id with
    | 't' -> n
    | 'r' -> n
    | 'e' -> (n / 2)
    |  _  -> 0   
    )
  |> fun (id, n) ->
    match id with
    | 't' -> n
    | 'r' -> n
    | 'e' -> n/2
    | _   -> 0
    |> stdout.WriteLine

``No.279 木の数え上げ``()
0