View Code of Problem 3700

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

Double click to view unformatted code.


Back to problem 3700