Remove Rightmost Set Bit

Python Medium 7 views
Back to Questions

Problem Description

One non-negative integer n is provided (n>0). Remove the rightmost set bit once and output the new number.

Input Format

One integer n.

Output Format

One integer.

Sample Test Case

Input:
12
Output:
8

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next