View Code of Problem 3700

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

Double click to view unformatted code.


Back to problem 3700