fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4. import java.math.*;
  5.  
  6. class Ideone
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. Scanner in = new Scanner(System.in);
  11. double k = in.nextDouble();
  12. double p = in.nextDouble();
  13. double s = in.nextDouble();
  14. double years = 0;
  15. if(s > k)
  16. years = Math.ceil(Math.log(s/k)/Math.log(1+(p/100)));
  17. System.out.println(years);
  18. }
  19. }
Success #stdin #stdout 0.16s 321344KB
stdin
1.14	0.08	40.00
stdout
4450.0