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. java.util.Scanner i = new java.util.Scanner(System.in);
  13. double t1 = i.nextDouble();
  14. double t2 = i.nextDouble();
  15. double t3 = i.nextDouble();
  16.  
  17. double t;
  18. t = (t1*t2*t3) / (t1*t2 + t1*t3 + t2*t3);
  19. if(t1*t2*t3 == 0) System.out.println(t);
  20. else System.out.printf("%.2f",t);
  21. }
  22. }
Success #stdin #stdout 0.08s 2184192KB
stdin
3 3 3
stdout
1.00