View Code of Problem 3700

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

Double click to view unformatted code.


Back to problem 3700