#Qua2202. Biggest Bitwise-Or
Biggest Bitwise-Or
Description
Given two natural numbers , you need to choose two integers that satisfy , and maximize .
The operator represents bitwise-or operation.
Format
Input
The first line contains one integer --- the number of test cases.
Each test case consists of one line containing two integers .
Output
For each test case, print a single integer --- the maximum bitwise-or result .
Samples
4
1 10
0 1
1023 1024
233 322
15
1
2047
511
相关
在下列比赛中: