Bitwise AND of a Range
Return the bitwise AND (&) of every integer from left to right, both included.
Example 1
left 5
right 7
returns 4
5 & 6 & 7 = 4.
Example 2
left 0
right 0
returns 0
Just one number.
Constraints
0 <= left <= right <= 1000
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.