BETA

Difficulty Level: Basic

Submissions: 195 Accuracy:

17.44%

[Maximize OR]
       

Given a number X find the total numbers A such that

A OR X > X,  and

1<=A<=X.

Input:
The first line contains an integer T denoting number of testcases. The following T lines contains an integer X each.


Output:
Print the total count of the different value of A possible. 

Constraints:

1<=T<=10^5
1<=X<=10^8

Example:
Input
2
10
5
Output
7
2

Explanation:
In the range [1,10] if the OR is taken of 10 and any number in the set {1,3,4,5,6,7,9} the resulting value will be greater than 10.

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

Contributor: ShivamKD

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.