fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin >> n;
  7. int i = 1;
  8. while (i<=n){
  9. cout << i <<"\n";
  10. i = 2*i;
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5320KB
stdin
76
stdout
1
2
4
8
16
32
64