結果

問題 No.378 名声値を稼ごう
ユーザー okkuukenkenokkuukenken
提出日時 2022-07-23 13:13:39
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 407 bytes
コンパイル時間 2,044 ms
コンパイル使用メモリ 127,156 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-18 09:07:42
合計ジャッジ時間 2,744 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<iomanip>
#include<numeric>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<random>
using namespace std;
typedef long long ll;
const int mod=998244353;
int main(){
	ll n;
	cin>>n;
	ll ans=0;
	while(n){
		ans+=n;
		n>>=1;
	}
	cout<<n*2-ans<<endl;
}
0