GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

Friday 3 June 2022

[Solution] Cirno's Perfect Bitmasks Classroom Codeforces Solution | Codeforces Problem Solution 2022

A. Cirno's Perfect Bitmasks Classroom
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output


Cirno'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>0

Where 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 (1t103) — the number of input test cases.

For each test case, the only line of input contains one integer x (1x230).

Output

For each test case, print a single integer — the minimum number of y.

No comments:

Post a Comment