View Code of Problem 3700

#include<iostream>
#include<string>
#include<cmath>
#include<cstring>
#include<vector>
#include<iomanip>
#include<cstdio>
#include<algorithm>
#include<ctype.h>
using namespace std;
int num[302];
int main()
{
	int n;
	while(cin>>n&&n!=0)
	{
		int cnt = 0;
		while (n % 2 == 0)
		{
			cnt++;
			n /= 2;
		}
		cout << pow(2, cnt) << endl;
	}
}

Double click to view unformatted code.


Back to problem 3700