The problem is straight and simple.
Given a number X ,find how many positive A ( \(A\gt 0)\) exists, such that
1. A \(\newcommand*\xor{\mathbin{\oplus}}\) X =A + X
2. A \(\lt\) X
Input:
The first line of the input will contain T , the number of test-cases.
Next T lines will contain integer X .
Output:
For each test-case , output the answer in a separate line.
Constraints:
- \(1 \le T \le 10^5\)
- \(1 \le X \le 10^7\)
Explanation for 1st test case:
For 1 there is no such number.
For 2nd case:
For 2 we have only one such number 1 \(\newcommand*\xor{\mathbin{\oplus}}\) 2 = 3
For 3rd case:
For number 3 we have no such number .
For 4th case:
For number 4 we have 3 \(\oplus\) 4 = 7 , 2 \(\oplus\) 4 = 6 and 1 \(\oplus\) 4 = 5. Hence the answer is 3.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor