E(签到)
题意:解法:
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 5010;
void solve()
{
ll x;
cin >> x;
ll y = x - (-x&x);
if (y)cout << y << endl;
else cout << -1 << endl;
return;
}
int main()
{
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
int t = 1;
cin >> t;
while (t--)
{
solve();
}
return 0;
}