~/algor $ cat problems/bit-oraliq-and
AND of a range
Medium
1000 ms
128 MB
51%
Integers $l \le r$ are given. Find $l \,\&\, (l + 1) \,\&\, \ldots \,\&\, r$. Here $\&$ is the bitwise AND operation: a position of the binary representation gives $1$ where both bits are $1$, and $0$ otherwise.
Input
One line with two integers: $l$ and $r$.
Output
One integer — the result.
Note
$0 \le l \le r \lt 2^{60}$
Examples
Input #1
12 15
Output #1
12
Input #2
5 7
Output #2
4