結果
問題 | No.2853 A + B Problem |
ユーザー | GOTKAKO |
提出日時 | 2024-08-25 13:48:53 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 303 bytes |
コンパイル時間 | 1,882 ms |
コンパイル使用メモリ | 200,132 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-08-25 13:49:01 |
合計ジャッジ時間 | 2,671 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); long long N; cin >> N; int one = 0; for(int i=0; i<60; i++) if(N&(1LL<<i)) one++; long long answer = 1; while(one--) answer *= 2; cout << answer-2 << endl; }