結果

問題 No.2853 A + B Problem
ユーザー yu23578
提出日時 2025-08-12 22:45:03
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 221 bytes
コンパイル時間 3,207 ms
コンパイル使用メモリ 274,568 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-08-12 22:45:08
合計ジャッジ時間 4,445 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long

int N;

signed main(){
  cin>>N;
  int cnt = 0;
  for(int i = 0; i < 61; i ++){
    cnt += ((N & (1ll<<i)) > 0);
  }
  cout << (1ll<<cnt) - 2 << "\n";
}
0