fork download
  1.  
  2. #include <iostream>
  3. #include <cmath>
  4. #include <cstdio>
  5. using namespace std;
  6.  
  7. int main() {
  8.  
  9. // your code here
  10. int a,b;
  11. int x1,y1,x2,y2;
  12. int a1,b1,c1,a2,b2,c2;
  13. double d1,d2,d3;
  14.  
  15. cin>>a>>b;
  16. cin>>x1>>y1>>x2>>y2;
  17. cin>>a1>>b1>>c1>>a2>>b2>>c2;
  18.  
  19. d1=abs(a-b);
  20. printf("%.3f\n",d1);
  21.  
  22. d2=sqrt(pow(x1-x2,2)+pow(y1-y2,2));
  23. printf("%.3f\n",d2);
  24.  
  25. d3=sqrt(pow(a1-a2,2)+pow(b1-b2,2)+pow(c1-c2,2));
  26. printf("%.3f\n",d3);
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 5304KB
stdin
Standard input is empty
stdout
1912716883.000
1268708576.011
2948231763.548