結果
| 問題 |
No.1450 nahco314's First Problem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-31 14:46:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 1,633 ms |
| コンパイル使用メモリ | 165,324 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 14:15:30 |
| 合計ジャッジ時間 | 7,892 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 5 WA * 32 |
ソースコード
//ethan_h
#include<bits/stdc++.h>
using namespace std;
#define ll long long
/*void test(){
int n;cin>>n;
string s;cin>>s;
vector<int>a(n);
for(int i=0;i<n;i++){
cin>>a[i];}
}
*/
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll n;
cin>>n;
bool k=false;
for(int i=0;i<=64;i++){
if(__builtin_popcount(n^i)==i){
cout<<pow(2,i);
k=true;
break;
}}
if(!k){
cout<<-1;
}
return 0;}