fork download
  1. import java.util.*;
  2.  
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args)
  7. {
  8. int N, k = 1;
  9. double S = 10, T = 10;
  10. Scanner input = new Scanner(System.in);
  11. N = input.nextInt();
  12. while (N > T)
  13. {
  14. S = S * 1.1;
  15. T = S + T;
  16. k++;
  17. }
  18. System.out.print(k);
  19.  
  20.  
  21. }
  22. }
Success #stdin #stdout 0.06s 2184192KB
stdin
47
stdout
5