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