View Code of Problem 3700

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

Double click to view unformatted code.


Back to problem 3700