fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, x;
  6. while (cin >> a && a != 0) {
  7. x = 1;
  8. while ((a & x) == 0){
  9. x = x << 1;
  10. }
  11. cout << x << endl;
  12. }
  13. return 0;
  14. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
Standard output is empty