fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int s = 900, n = 30;
  6. while (s < n) {
  7. s = s*s - 20;
  8. n = n + 30;
  9. }
  10. if (s > n)
  11. {n++;}
  12. cout << n;
  13. return 0;;
  14. }
Success #stdin #stdout 0s 5624KB
stdin
Standard input is empty
stdout
31