結果

問題 No.378 名声値を稼ごう
ユーザー tak
提出日時 2018-09-09 12:26:48
言語 F#
(F# 4.0)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 160 bytes
コンパイル時間 9,185 ms
コンパイル使用メモリ 185,536 KB
実行使用メモリ 29,184 KB
最終ジャッジ日時 2024-07-01 04:19:31
合計ジャッジ時間 10,175 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (251 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let R() = stdin.ReadLine()
let rec score = function
    | 0L -> 0L
    | x  -> x + score(x / 2L)

let N = R() |> int64

(N * 2L) - (score N) |> stdout.WriteLine
0