View Code of Problem 3700

#include <bits/stdc++.h>
using namespace std;
int main(){
	int T;
	while(cin>>T&&T!=0){
		vector<int>v;
		int cur=0;
		while(T){
			if(T%2==0){
				T=T/2;
				cur++;
			}			
			else
				break;
		}
		cout<<pow(2,cur)<<endl;
	}
}

Double click to view unformatted code.


Back to problem 3700