View Code of Problem 3700

#include <iostream>
#include <cstdio>
#include <cmath>
 
 
using namespace std;
 
 
int main(){
	int n;
	while(scanf("%d",&n)!=EOF,n){
 
		int t = 0;
		while(n%2 == 0){
			t++;
			n /= 2;
		}
 
		printf("%d\n",(int)pow(2+0.0,t));
	}
 
	return 0;
}

Double click to view unformatted code.


Back to problem 3700