結果
| 問題 | 
                            No.1046 Fruits Rush
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tak
                         | 
                    
| 提出日時 | 2020-06-25 12:39:07 | 
| 言語 | F#  (F# 4.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 372 bytes | 
| コンパイル時間 | 6,002 ms | 
| コンパイル使用メモリ | 191,980 KB | 
| 実行使用メモリ | 36,396 KB | 
| 最終ジャッジ日時 | 2024-07-03 21:26:52 | 
| 合計ジャッジ時間 | 12,371 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 12 WA * 2 | 
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (210 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 System
let (N, K) = 
    let t = Console.ReadLine().Split() |> Array.map int 
    t.[0], t.[1]
let A = Console.ReadLine().Split() |> Array.map int 
A 
|> Array.sortDescending
|> Array.splitAt 1
|> fun (a, b) -> 
    let t = 
        b
        |> Array.truncate K 
        |> Array.where(fun x -> x > 0)
    Array.fold(fun acc x -> acc + x) a.[0] t 
|> printfn "%i"
            
            
            
        
            
tak