~/algor $ cat problems/bit-eng-kichik-bir
Lowest set bit
Easy
1000 ms
128 MB
23%
A positive integer $n$ is given. What value does the rightmost bit equal to $1$ in its binary representation stand for? That is, if this bit is at position $k$ (from the right, starting from $0$), print $2^{k}$. For example, for $12 = 1100_{2}$ the answer is $4$.
Input
One positive integer $n$.
Output
One integer — $2^{k}$.
Note
$1 \le n \lt 2^{60}$
Examples
Input #1
12
Output #1
4
Input #2
7
Output #2
1