結果

問題 No.5 数字のブロック
ユーザー regeregeregerege
提出日時 2015-11-25 20:09:56
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 418 bytes
コンパイル時間 5,764 ms
コンパイル使用メモリ 156,304 KB
実行使用メモリ 27,248 KB
最終ジャッジ日時 2023-10-11 18:31:53
合計ジャッジ時間 10,883 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
25,248 KB
testcase_01 AC 91 ms
23,076 KB
testcase_02 WA -
testcase_03 AC 104 ms
23,700 KB
testcase_04 AC 102 ms
21,640 KB
testcase_05 WA -
testcase_06 AC 104 ms
23,608 KB
testcase_07 AC 104 ms
21,496 KB
testcase_08 AC 106 ms
21,708 KB
testcase_09 AC 101 ms
23,476 KB
testcase_10 AC 106 ms
23,924 KB
testcase_11 AC 102 ms
25,584 KB
testcase_12 AC 103 ms
23,576 KB
testcase_13 AC 106 ms
25,756 KB
testcase_14 AC 93 ms
23,180 KB
testcase_15 WA -
testcase_16 AC 107 ms
25,672 KB
testcase_17 AC 106 ms
23,908 KB
testcase_18 AC 107 ms
23,852 KB
testcase_19 AC 106 ms
25,988 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 94 ms
25,100 KB
testcase_24 AC 100 ms
23,352 KB
testcase_25 AC 101 ms
23,296 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

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 数字のブロック`` ()
0