fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. // your code goes here
  13. double a = 12345.678901;
  14. double ea = 1.2345;
  15. double ka = 67.8901;
  16. double b = 9876.54321;
  17. double eb = 0.1928;
  18. double kb = 1.23456;
  19.  
  20. double sa = 0.0, sb = 0.0;
  21. for (int i = 0; i < 100; i++) {
  22. sa += Math.pow(a, ea);
  23. sb += Math.pow(b, eb);
  24. }
  25.  
  26. double c = 1e10 - ka * sa - kb * sb;
  27.  
  28. System.out.printf("%25.12f", c);
  29. }
  30. }
Success #stdin #stdout 0.04s 2184192KB
stdin
Standard input is empty
stdout
  9236547359.632048000000