Given two integers
Input Specification
The first line of input is the integer
Output Specification
For each test case, output the (decimal) value of the XOR of all numbers between
Sample Input
Copy
5
3 10
5 5
13 42
666 1337
1234567 89101112
Output for Sample Input
Copy
8
5
39
0
89998783
Comments
My wrong submission passed. Doesn't even pass sample, more test cases are probably needed.
I'm a bit confused, how is the XOR of 5 and 5 equal to 5? I thought it was 0.
It's asking you for the XOR of all numbers in the range![[S, F]](https://static.dmoj.ca/static/blank.b44917055649.gif)
. 
is the only number in the range ![[5, 5]](https://static.dmoj.ca/static/blank.b44917055649.gif)
, so the answer is 5.
TLEEEEEE ARGGGH something tells me i have to do more than just the XOR bitewise operator (^). do i?
Look for a pattern!
So there IS a pattern! ahh.....
How do you get an XOR of a multi digit number? Isn't it only for True and False?
We are looking for the bitwise XOR.
When I do that, 3 and 10 give me 9, and 5 and 5 give 0...
you are misunderstanding the problem it asks for the xor of all numbers between s and f, so for the example of 3 and 10 it would be 3 XOR 4 XOR... XOR 10
thanks