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. double a, b, x, z, v;
  13. Scanner in = new Scanner(System.in);
  14. x = in.nextDouble();
  15. a = x*x;
  16. b = 4*(x*a);
  17. z = 1 - (2*x) + (3*a) - b;
  18. v = 1 + (2*x) + (3*a) + b;
  19. System.out.format("%f ", z);
  20. System.out.format("%f ", v);
  21. }
  22. }
Success #stdin #stdout 0.16s 321280KB
stdin
-75
stdout
1704526.000000 -1670774.000000