FunctionRacerProblemsRace

Bitwise AND of a Range

EasyBitsPython, JavaScript, TypeScript, Java, C++

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

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Bits problems