1838Lowest Bit

1838   Lowest Bit

题目描述

Given an positive integer A (1 <= A <= 100), output the lowest bit of A.

For example, given A = 26, we can write A in binary form as 11010, so the lowest bit of A is 10, so the output should be 2.

Another example goes like this: given A = 88, we can write A in binary form as 1011000, so the lowest bit of A is 1000, so the output should be 8.

输入格式:

Each line of input contains only an integer A (1 <= A <= 100). A line containing "0" indicates the end of input, and this line is not a part of the input data.

输出格式:

For each A in the input, output a line containing only its lowest bit.

输入样例 复制
26
88
0
输出样例 复制
2
8

说明

58
93
通过提交
时空限制2000ms/64mb
题目来源
评测方式在线评测
题目类型基础强化
难        度