結果
| 問題 |
No.2853 A + B Problem
|
| コンテスト | |
| ユーザー |
nonon
|
| 提出日時 | 2024-08-25 13:32:27 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 336 bytes |
| コンパイル時間 | 1,860 ms |
| コンパイル使用メモリ | 191,456 KB |
| 最終ジャッジ日時 | 2025-02-24 00:45:28 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 21 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
long N;
cin>>N;
int cnt=0;
for(int i=0;i<60;i++)if(N>>i&1)cnt++;
if(cnt==1)
{
cout<<0<<endl;
return 0;
}
cnt--;
long ans=1;
for(;cnt--;)ans*=2;
cout<<ans<<endl;
}
nonon