結果
問題 | No.589 Counting Even |
ユーザー |
![]() |
提出日時 | 2018-12-02 22:17:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 1,718 ms |
コンパイル使用メモリ | 192,264 KB |
最終ジャッジ日時 | 2025-01-06 17:57:06 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} //INSERT ABOVE HERE signed main(){ Int n; cin>>n; cout<<n+1-(1LL<<__builtin_popcountll(n))<<endl; return 0; }