結果
| 問題 | No.589 Counting Even | 
| コンテスト | |
| ユーザー |  0x19f | 
| 提出日時 | 2017-11-04 16:13:24 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 268 bytes | 
| コンパイル時間 | 1,215 ms | 
| コンパイル使用メモリ | 158,168 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-23 17:55:24 | 
| 合計ジャッジ時間 | 2,001 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 WA * 19 | 
ソースコード
#include <bits/stdc++.h>
#define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++)
using namespace std;
typedef long long ll;
int main(void) {
  ll N;
  cin >> N;
  ll cnt = 0;
  REP(i, 0, 63) if(N & (1LL << i)) cnt++;
  cout << N + 1 - pow(2LL, cnt) << endl;
}
            
            
            
        