結果

問題 No.51 やる気の問題
ユーザー taktak
提出日時 2018-05-25 01:12:02
言語 F#
(F# 4.0)
結果
AC  
実行時間 97 ms / 5,000 ms
コード長 410 bytes
コンパイル時間 5,827 ms
コンパイル使用メモリ 156,436 KB
実行使用メモリ 31,312 KB
最終ジャッジ日時 2023-09-11 03:17:06
合計ジャッジ時間 6,514 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
22,800 KB
testcase_01 AC 84 ms
22,784 KB
testcase_02 AC 85 ms
26,988 KB
testcase_03 AC 84 ms
25,072 KB
testcase_04 AC 85 ms
22,856 KB
testcase_05 AC 92 ms
30,720 KB
testcase_06 AC 91 ms
29,968 KB
testcase_07 AC 89 ms
25,852 KB
testcase_08 AC 90 ms
27,508 KB
testcase_09 AC 97 ms
31,312 KB
testcase_10 AC 89 ms
25,864 KB
testcase_11 AC 89 ms
25,548 KB
testcase_12 AC 90 ms
28,048 KB
testcase_13 AC 92 ms
30,056 KB
testcase_14 AC 90 ms
25,832 KB
testcase_15 AC 93 ms
30,764 KB
testcase_16 AC 87 ms
23,744 KB
testcase_17 AC 86 ms
23,048 KB
testcase_18 AC 94 ms
26,736 KB
testcase_19 AC 96 ms
28,892 KB
testcase_20 AC 90 ms
30,040 KB
testcase_21 AC 84 ms
23,188 KB
testcase_22 AC 94 ms
31,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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() |> int64
let Work W D = W / (D * D)

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

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