atcoder#ARC129A. [ARC129A] Smaller XOR
[ARC129A] Smaller XOR
Score : points
Problem Statement
Given are integers , , and . Count the number of integers that satisfy both of the following conditions.
- (Here, denotes the bitwise .)
What is the bitwise $\mathrm{XOR}$?
The bitwise $\mathrm{XOR}$ of integers $A$ and $B$, $A\oplus B$, is defined as follows:
- When $A\oplus B$ is written in base two, the digit in the $2^k$'s place ($k \geq 0$) is $1$ if exactly one of $A$ and $B$ is $1$, and $0$ otherwise.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
2 1 2
1
For , is satisfied, but is not. For , both conditions are satisfied. There is no other that satisfies the conditions.
10 2 19
10
1000000000000000000 1 1000000000000000000
847078495393153025