結果
問題 |
No.2853 A + B Problem
|
ユーザー |
|
提出日時 | 2024-08-20 19:05:38 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 297 bytes |
コンパイル時間 | 1,882 ms |
コンパイル使用メモリ | 192,304 KB |
最終ジャッジ日時 | 2025-02-23 23:13:56 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; long long ans = 1; for(int i = 0; i < 30; i++){ if(n & (1 << i)){ ans *= 2; } } ans -= 2; cout << ans << endl; }