結果

問題 No.378 名声値を稼ごう
ユーザー nobigomunobigomu
提出日時 2018-06-03 23:47:04
言語 F#
(F# 4.0)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 4,225 ms
コンパイル使用メモリ 155,608 KB
実行使用メモリ 24,900 KB
最終ジャッジ日時 2023-09-12 22:01:08
合計ジャッジ時間 4,787 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
22,788 KB
testcase_01 AC 81 ms
24,900 KB
testcase_02 AC 81 ms
22,668 KB
testcase_03 AC 80 ms
22,608 KB
testcase_04 AC 81 ms
20,768 KB
testcase_05 AC 81 ms
24,828 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let f a = a/2L
let g a = (2L*(f a)+a)
let rec h a b c = if a<>0L then h (f a) (b + (f a)) (max c (g a)) else abs (c-b)
(stdin.ReadLine >> int64 >> fun n -> h n n (2L*n)) () |> printfn "%d"
0