Trailing Zero Bits

Easy · rating 1000 · Bit Manipulation, Math

Read a positive integer n. Print the number of trailing zero bits in its binary representation (equivalently, the largest k with 2k dividing n).

Constraints: 1 ≤ n ≤ 1018

Related problems

Open Trailing Zero Bits in Code Arena →