#include<bits/stdc++.h> using namespace std; int main(){ int a; while(cin >> a && a != 0){ int n = 0; while(a%2 == 0){ a/=2; n++; } cout << pow(2,n) << endl; } }
Double click to view unformatted code.