CF1688A.Cirno's Perfect Bitmasks Classroom
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Even if it's a really easy question, she won't be able to answer it
— Perfect Memento in Strict Sense
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.
Among the students was Mystia, who was truly baffled by all these new operators. Please help her!
输入格式
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 ).
输出格式
For each test case, print a single integer — the minimum number of y .
输入输出样例
输入#1
7 1 2 5 9 16 114514 1000000
输出#1
3 3 1 1 17 2 64
说明/提示
Test case 1:
1and3=1>0 , 1xor3=2>0 .
Test case 2:
2and3=2>0 , 2xor3=1>0 .