Codeforces Round 676 (Div. 2)
A
XORwice
Codeforces
800
原题
←B →
翻译中…

In order to celebrate Twice's 5th anniversary, Tzuyu and Sana decided to play a game.

翻译中…

Tzuyu gave Sana two integers $a$ and $b$ and a really important quest.

翻译中…

In order to complete the quest, Sana has to output the smallest possible value of ($a \oplus x$) + ($b \oplus x$) for any given $x$, where $\oplus$ denotes the bitwise XOR operation.

翻译中…

Input

翻译中…

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10^{4}$). Description of the test cases follows.

翻译中…

The only line of each test case contains two integers $a$ and $b$ ($1 \le a, b \le 10^{9}$).

翻译中…

Output

翻译中…

For each testcase, output the smallest possible value of the given expression.

翻译中…

Note

翻译中…

For the first test case Sana can choose $x=4$ and the value will be ($6 \oplus 4$) + ($12 \oplus 4$) = $2 + 8$ = $10$. It can be shown that this is the smallest possible value.

翻译中…

样例

Input #1
6
6 12
4 9
59 832
28 14
4925 2912
1 1
Output #1
10
13
891
18
6237
0
InputCopy OutputCopy
题目信息
题号
1421A
时间限制
1 s
内存限制
256 MB
标签
位运算
贪心
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。