fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. double k = 1, T = 10, N, S = 10;
  8. cin >> N;
  9. while (N > T) {
  10. S = S * 1.1;
  11. T = S + T;
  12. k++;
  13. }
  14. cout << k;
  15. return 0;
  16. }
Success #stdin #stdout 0s 4392KB
stdin
Standard input is empty
stdout
1