fork(1) download
  1. import java.util.Scanner;
  2.  
  3. class ML36
  4. {
  5. public static void main (String[] args)
  6. {
  7. double v, u, s, t;
  8. double inf = Double.POSITIVE_INFINITY;
  9. Scanner scanner = new Scanner(System.in);
  10.  
  11. v = scanner.nextDouble();
  12. u = scanner.nextDouble();
  13. s = scanner.nextDouble();
  14.  
  15. t = (v>=u) ? s/(v+u) + s/(v-u) : inf;
  16.  
  17. System.out.println(t);
  18. }
  19. }
Success #stdin #stdout 0.08s 4386816KB
stdin
2
1
0
stdout
0.0