結果

問題 No.51 やる気の問題
ユーザー taktak
提出日時 2018-05-25 01:09:59
言語 F#
(F# 4.0)
結果
RE  
実行時間 -
コード長 405 bytes
コンパイル時間 5,108 ms
コンパイル使用メモリ 157,928 KB
実行使用メモリ 29,732 KB
最終ジャッジ日時 2023-09-11 03:16:42
合計ジャッジ時間 7,747 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
22,952 KB
testcase_01 AC 84 ms
22,800 KB
testcase_02 AC 84 ms
22,808 KB
testcase_03 AC 82 ms
22,940 KB
testcase_04 AC 82 ms
22,860 KB
testcase_05 RE -
testcase_06 AC 85 ms
25,784 KB
testcase_07 AC 85 ms
23,628 KB
testcase_08 AC 84 ms
25,200 KB
testcase_09 RE -
testcase_10 AC 85 ms
25,392 KB
testcase_11 AC 86 ms
25,328 KB
testcase_12 AC 86 ms
25,688 KB
testcase_13 AC 88 ms
29,732 KB
testcase_14 AC 85 ms
27,660 KB
testcase_15 RE -
testcase_16 AC 84 ms
23,224 KB
testcase_17 AC 82 ms
22,928 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 87 ms
27,704 KB
testcase_21 AC 83 ms
22,908 KB
testcase_22 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let R    ()  = stdin.ReadLine() |> int
let Work W D = W / (D * D)

let W = R ()
let D = R ()

(W,D) 
|> Array.unfold(fun (w,d) ->
        match d with
        | 0 ->
            None
        | d ->
            let dayWork  = Work w d
            let leftWork = w - dayWork
            let leftDay  = d - 1
            Some(dayWork,(leftWork,leftDay)))
|> Array.last
|> printfn "%i"               
        
0