結果
問題 |
No.2853 A + B Problem
|
ユーザー |
|
提出日時 | 2024-08-26 22:55:08 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 615 bytes |
コンパイル時間 | 933 ms |
コンパイル使用メモリ | 111,032 KB |
最終ジャッジ日時 | 2025-02-24 02:21:36 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
#include<iostream> #include<string> #include<queue> #include<vector> #include<cassert> #include<random> #include<set> #include<map> #include<cassert> #include<unordered_map> #include<bitset> #include<numeric> #include<algorithm> using namespace std; using ll = long long; using ull = unsigned long long; const int inf=1<<30; const ll INF=1LL<<62; using P = pair<int,int>; typedef pair<int,P> PP; const ll MOD=998244353; const int MAXN=100000; int main(){ ll N; cin>>N; ll c=1; while(N>0){ if(N%2){ c*=2; } N/=2; } ll ans=c-2; cout<<ans<<endl; }