View Code of Problem 3700

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

Double click to view unformatted code.


Back to problem 3700