luogu#P16337. 「ALFR Round 10」Bit Problem
「ALFR Round 10」Bit Problem
Problem Description
Given two non-negative integers and , you need to determine the value of the non-negative integer after applying the following operation exactly times:
- .
Input Format
There are test cases.
The first line contains a positive integer , the number of test cases.
For each test case:
- A single line contains three non-negative integers .
Output Format
For each test case, output a single line containing one non-negative integer — the answer.
7
1 2 2
3 5 1
2 3 3
6 7 1
1 6 1
4 9 1
9 1 1
0
0
0
0
0
0
8
Hint
For of the data:
- ;
- ;
- .
| Subtask | Special Property | |
|---|---|---|
| 1 | None | |
| 2 | ^ | |
| 3 | ||
| 4 | None |