結果
問題 | No.1046 Fruits Rush |
ユーザー |
![]() |
提出日時 | 2020-06-25 12:39:48 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 348 ms / 2,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 7,087 ms |
コンパイル使用メモリ | 192,576 KB |
実行使用メモリ | 35,256 KB |
最終ジャッジ日時 | 2024-07-03 21:27:09 |
合計ジャッジ時間 | 13,913 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (237 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/
ソースコード
open Systemlet (N, K) =let t = Console.ReadLine().Split() |> Array.map intt.[0], t.[1]let A = Console.ReadLine().Split() |> Array.map intA|> Array.sortDescending|> Array.splitAt 1|> fun (a, b) ->let t =b|> Array.truncate (K - 1)|> Array.where(fun x -> x > 0)Array.fold(fun acc x -> acc + x) a.[0] t|> printfn "%i"