結果

問題 No.378 名声値を稼ごう
ユーザー kuuso1kuuso1
提出日時 2016-08-16 22:39:22
言語 F#
(F# 4.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 5,447 ms
コンパイル使用メモリ 171,364 KB
実行使用メモリ 24,880 KB
最終ジャッジ日時 2023-09-12 01:09:56
合計ジャッジ時間 5,527 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

open System
type Sol() =
    member this.Solve() = 
        let N = int64 (Console.ReadLine())
        let rec f (x:int64) =
            if x = 0L then 0L
            else x + f (x/2L)
        N*2L - f N |> printfn "%d"

let mySol = new Sol()
mySol.Solve()
0