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,s;
		while(n%2!=1){
			n=n/2;
			k++;
		}
		s=pow(2,k);
		printf("%d\n",s);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3700