fork download
  1. //ML2
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. class First
  8. {
  9. public static void main (String[] args) throws java.lang.Exception
  10. {
  11. double x, y, solution;
  12. Scanner input = new Scanner(System.in);
  13.  
  14. x = input.nextDouble();
  15. y = input.nextDouble();
  16.  
  17. solution = (Math.abs(x) - Math.abs(y)) / (Math.abs(x) + Math.abs(y));
  18.  
  19. System.out.println(solution);
  20. }
  21. }
Success #stdin #stdout 0.08s 4386816KB
stdin
2 -3
stdout
-0.2