View Code of Problem 3700

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

Double click to view unformatted code.


Back to problem 3700