Submit | All submissions | Best solutions | Back to list |
BT69 - BitPlay69 |
You are given 2 integers N and M.
Print the smallest K, such that N ⊕ K > M. Here, ⊕ is the Bitwise XOR Operator.
Input
The first line contains a single integer T (1 ≤ T ≤ 100) - The number of test cases.
The first and only line of each test case contains 2 integers N and M (1 ≤ N, M ≤ 1017)
Output
A single integer - K.
Example
Input: 4 3 5 3 2 69 696 696 96 Output: 4 0 640 0
Added by: | Dr. AddictStein |
Date: | 2023-04-14 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
Resource: | Dr. AddictStein Research Lab |