結果
問題 | No.2853 A + B Problem |
ユーザー |
|
提出日時 | 2024-08-25 13:48:53 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 303 bytes |
コンパイル時間 | 1,902 ms |
コンパイル使用メモリ | 193,320 KB |
最終ジャッジ日時 | 2025-02-24 00:58:18 |
ジャッジサーバーID (参考情報) |
judge3 / 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;}