結果
問題 |
No.5 数字のブロック
|
ユーザー |
|
提出日時 | 2015-11-25 20:09:56 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 418 bytes |
コンパイル時間 | 14,158 ms |
コンパイル使用メモリ | 191,684 KB |
実行使用メモリ | 36,956 KB |
最終ジャッジ日時 | 2024-09-13 17:25:48 |
合計ジャッジ時間 | 27,555 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 14 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (326 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/
ソースコード
let ``No.5 数字のブロック`` () = let L = int <| stdin.ReadLine() let M = int <| stdin.ReadLine() let N = stdin.ReadLine().Split(' ') |> Seq.map int |> Seq.sort |> Seq.toList let rec f s c = function | [] -> c | x::xs -> if s >= L then c else f (s+x) (c+1) xs printfn "%d" ((f 0 0 N)-1) ``No.5 数字のブロック`` ()