結果

問題 No.279 木の数え上げ
ユーザー chike_pluschike_plus
提出日時 2019-03-27 09:58:55
言語 F#
(F# 4.0)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 439 bytes
コンパイル時間 6,500 ms
コンパイル使用メモリ 185,780 KB
実行使用メモリ 36,992 KB
最終ジャッジ日時 2024-04-19 09:44:36
合計ジャッジ時間 9,163 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
30,208 KB
testcase_01 AC 61 ms
29,952 KB
testcase_02 AC 63 ms
29,952 KB
testcase_03 AC 61 ms
30,080 KB
testcase_04 AC 60 ms
30,336 KB
testcase_05 AC 61 ms
30,336 KB
testcase_06 AC 61 ms
30,056 KB
testcase_07 AC 61 ms
30,336 KB
testcase_08 AC 61 ms
30,336 KB
testcase_09 AC 60 ms
30,336 KB
testcase_10 AC 100 ms
36,736 KB
testcase_11 AC 72 ms
32,000 KB
testcase_12 AC 89 ms
35,456 KB
testcase_13 AC 67 ms
31,360 KB
testcase_14 AC 102 ms
36,992 KB
testcase_15 AC 96 ms
36,224 KB
testcase_16 AC 94 ms
35,968 KB
testcase_17 AC 100 ms
36,992 KB
testcase_18 AC 83 ms
33,532 KB
testcase_19 AC 99 ms
36,844 KB
testcase_20 AC 103 ms
36,864 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (220 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.countBy (fun id -> id)
  |> Seq.filter (fun (id,n) -> (id = 't' || id = 'r' || id = 'e'))
  |> 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