Turn off the k-th bit of an integer using bitwise operations.
Constraints
Example
>>> clear_kth_bit(13, 1) 13 # 1101 → 1101 (bit 1 is already 0) >>> clear_kth_bit(13, 2) 9 # 1101 → 1001 >>> clear_kth_bit(255, 7) 127 # 11111111 → 01111111
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints