fork download
  1.  
  2. import java.util.*;
  3. import java.lang.*;
  4. import java.io.*;
  5. import java.util.Scanner;
  6.  
  7. class Main
  8. {
  9. public static void main (String[] args) throws java.lang.Exception
  10. {
  11. double x1, y1, z1, x, y, S;
  12. Scanner in = new Scanner(System.in);
  13. x = in.nextInt();
  14. y = in.nextInt();
  15. x1 = in.nextInt();
  16. y1 = in.nextInt();
  17. z1 = in.nextInt();
  18. S = Math.sqrt((x1 - x)*(x1 - x) + (y1-y)*(y1-y) + z1*z1);
  19. System.out.printf("%.3f", 1/S);
  20. }
  21. }
Success #stdin #stdout 0.07s 2184192KB
stdin
60 21
11 44 -7
stdout
0.018