100 atcoder#ABC121D. [ABC121D] XOR World
[ABC121D] XOR World
Score : points
Problem Statement
Let be the exclusive OR of . Find .
What is exclusive OR?
The bitwise exclusive OR of integers (let us call it ) is defined as follows:
- When is written in base two, the digit in the 's place () is if, the number of integers among whose binary representations have in the 's place, is odd, and if that count is even.
For example, the exclusive OR of and is . (When written in base two: the exclusive OR of 011
and 101
is 110
.)
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Compute and print it.
2 4
5
are 010
, 011
, 100
in base two, respectively.
The exclusive OR of these is 101
, which is in base ten.
123 456
435
123456789012 123456789012
123456789012