BETA

Difficulty Level:

Basic

Total Submissions: 80 Accuracy:

38.75%

XOR Game
     

Given a positive number k, we need to find a minimum value of positive integer n, such that XOR of n and n+1 is equal to k. If no such n exist then print -1.

Input:
The first line consists of an integer T i.e number of test cases. The only line of each test case consists of an integer k.

Output:
Print the required output.

Constraints: 
1<=T<=100
1<=k<=100

Example:
Input:

2
3
6

Output:
1
-1

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Ashtputre

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.