結果
| 問題 |
No.1450 nahco314's First Problem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-31 15:23:36 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 417 bytes |
| コンパイル時間 | 1,949 ms |
| コンパイル使用メモリ | 193,176 KB |
| 最終ジャッジ日時 | 2025-01-20 01:52:10 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 5 WA * 32 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(ll i = 0; i < ll(n); i++)
using ll = long long;
using P = pair<int, int>;
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
ll x;
cin >> x;
rep(i, 64) {
if (i == __builtin_popcount(x ^ i)) {
cout << (x ^ i) << endl;
return 0;
}
}
cout << -1 << endl;
return 0;
}