View Code of Problem 3700

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

Double click to view unformatted code.


Back to problem 3700