View Code of Problem 3700

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

Double click to view unformatted code.


Back to problem 3700