3 条题解

  • 1
    @ 2022-5-27 20:28:15
    using namespace std;
    	int a,b,c,d,x,y;
    int main(){
    	cin>>a>>b>>c>>d;
    	x=abs(a-c);
    	y=abs(d-b);
    	cout<<fixed<<setprecision(2)<<sqrt(x*x+y*y) << endl;
    
    
    	
    	return 0;
    }
    

    组合拳奥!(两点距离公式有但我就不用( ̄ε(# ̄)☆╰╮o( ̄皿 ̄///))

  • 0
    @ 2023-2-4 11:54:01

    #include<bits/stdc++.h> using namespace std; int main() { double a,b,c,d,x; cin>>a>>b>>c>>d; x= (a-c)(a-c)+(b-d)(b-d); x=fabs(x); x=sqrt(x) ; printf("%.2lf",x); return 0 ; }

    • 0
      @ 2022-10-27 13:44:21
      #include<bits/stdc++.h>
      using namespace std;
      	
      int main(){
      	double x1,y1,x2,y2;
      	cin>>x1>>y1>>x2>>y2;
      	printf("%.2lf",sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)));
      	return 0;
      }
      
      • 1

      信息

      ID
      21
      时间
      1000ms
      内存
      256MiB
      难度
      3
      标签
      递交数
      138
      已通过
      71
      上传者