fork download
  1. #include <iostream>
  2. #include <cmath>
  3. #include <iomanip>
  4. using namespace std;
  5.  
  6.  
  7. int main() {
  8. double x1, y1, z1, x, y, S;
  9. cin>>x>>y;
  10. cin>>x1>>y1>>z1;
  11. S=sqrt((x1-x)*(x1-x) + (y1-y)*(y1-y) + z1*z1);
  12. cout<<fixed<<setprecision(3)<<1/S;
  13.  
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 15240KB
stdin
60 21
11 44 -7
stdout
0.018