View Code of Problem 3700

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,a;
	while(scanf("%d",&n)!=EOF){
		a=0;
		if(n==0) break;
		else{
			while(n%2==0){
				a++;
				n=n/2;	
			}
			cout<<pow(2,a)<<endl;
		}
	}
}

Double click to view unformatted code.


Back to problem 3700