View Code of Problem 3700

#include <stdio.h>
#include <math.h>
#include <string.h>

int main(){
	int a,i;
	int j;int sum;
	while(scanf("%d",&a)!=EOF){	
		char str[100];
		if(a==0)
			break;
		i=0;
		while(a%2==0){
			a=a/2;
			i++;
		}
		sum=pow(2,i);
		printf("%d\n",sum);
	}
	
	
}

Double click to view unformatted code.


Back to problem 3700