[Solution] Cirno's Perfect Bitmasks Classroom Codeforces Solution | Codeforces Problem Solution 2022
A. Cirno's Perfect Bitmasks Classroom
time limit per test
1 secondmemory limit per test
256 megabytesinput
standard inputoutput
standard outputCirno's perfect bitmasks classroom has just started!
Cirno gave her students a positive integer x. As an assignment, her students need to find the minimum positive integer y, which satisfies the following two conditions:
x and y>0
x xor y>0Where and is the bitwise AND operation, and xor is the bitwise XOR operation.
Solution Click Below:- CLICK HERE
Among the students was Mystia, who was truly baffled by all these new operators. Please help her!
Input
The first line of input contains a single integer t (1≤t≤103) — the number of input test cases.
For each test case, the only line of input contains one integer x (1≤x≤230).
Output
For each test case, print a single integer — the minimum number of y.
No comments:
Post a Comment