View Code of Problem 3700

#include<stdio.h>
#include<math.h>
int main()
{
	int a,l;
	while(scanf("%d",&a)!=EOF&&a!=0)
	{
		int count=0;
		while(a%2==0)
		{
			a/=2;
			count++;
		}
		int sum=(int)pow(2,count); 
		printf("%d\n",sum);
	}
	return 0;
} 

Double click to view unformatted code.


Back to problem 3700