結果
| 問題 | No.1046 Fruits Rush |
| コンテスト | |
| ユーザー |
tak
|
| 提出日時 | 2020-06-25 12:39:07 |
| 言語 | F# (F# 10.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 372 bytes |
| 記録 | |
| コンパイル時間 | 11,472 ms |
| コンパイル使用メモリ | 208,044 KB |
| 実行使用メモリ | 37,428 KB |
| 最終ジャッジ日時 | 2026-03-25 04:34:28 |
| 合計ジャッジ時間 | 16,352 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 12 WA * 2 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (211 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.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