题目:http://acm.hdu.edu.cn/showproblem.php?pid=1196
#include <stdio.h>
#include <math.h>
int main()
{
int n,a,num,count;
while(scanf("%d",&n)!=EOF)
{
if(n==0) break;
num=count=0;
while(n!=0)
{
a=n%2;
if(a==0) count++;
else {
num=(int)pow(2,1.0*count);break;
}
n=n/2;
}
printf("%d\n",num);
}
return 0;
}