View Code of Problem 3700

#include<stdio.h>
#include<math.h>
int main()
{
	int a;
  	while(scanf("%d",&a)!=EOF)
        {
          	int k = 0,t;
  		if(a==0)break;
  		while(a%2==0)
        	{
        		k++;
                  	a = a / 2;
        	}
          	t = pow(2,k);
          	printf("%d",t);
        }
  	return 0;
}

Double click to view unformatted code.


Back to problem 3700