fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int N;
  6. cin >> N;
  7.  
  8. while (N <= 1000) {
  9. if (N * 2 > 1000) {
  10. break;
  11. }
  12. N *= 2;
  13. }
  14.  
  15. cout << N << endl;
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
32765