結果
問題 |
No.378 名声値を稼ごう
|
ユーザー |
|
提出日時 | 2022-11-12 08:53:16 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 538 bytes |
コンパイル時間 | 2,026 ms |
コンパイル使用メモリ | 110,184 KB |
実行使用メモリ | 25,804 KB |
最終ジャッジ日時 | 2024-09-14 01:11:15 |
合計ジャッジ時間 | 2,699 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Numerics; using static System.Math; namespace SortItems { class Program { static void Main(string[] args) { var n = long.Parse(Console.ReadLine()); long m = n; long d = 0; // 通常の値を取得する while(m > 0) { d += m; m = m / 2; } Console.WriteLine((n * 2) - d); } } }