codeforces#P1421A. XORwice
XORwice
Description
In order to celebrate Twice's 5th anniversary, Tzuyu and Sana decided to play a game.
Tzuyu gave Sana two integers and and a really important quest.
In order to complete the quest, Sana has to output the smallest possible value of () + () for any given , where denotes the bitwise XOR operation.
Each test contains multiple test cases. The first line contains the number of test cases (). Description of the test cases follows.
The only line of each test case contains two integers and ().
For each testcase, output the smallest possible value of the given expression.
Input
Each test contains multiple test cases. The first line contains the number of test cases (). Description of the test cases follows.
The only line of each test case contains two integers and ().
Output
For each testcase, output the smallest possible value of the given expression.
Samples
Note
For the first test case Sana can choose and the value will be () + () = = . It can be shown that this is the smallest possible value.