2 条题解

  • 0
    @ 2023-10-22 11:06:39
    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int xa,ya,xb,yb;
        cin>>xa>>ya>>xb>>yb;
        printf("%.3f",sqrt((xa-xb)*(xa-xb)+(ya-yb)*(ya-yb)));
        return 0;
    }
    
    • 0
      @ 2023-10-1 15:24:26
      #include<iostream>
      #include<cstdio>
      #include<cmath>
      using namespace std;
      int main(){
      	double xa,xb,ya,yb,l;
      	cin >> xa >> ya >> xb >> yb;
      	l = sqrt(pow(xa-xb,2)+pow(ya-yb,2));
      	printf("%.3lf",l);
      	return 0;
      }
      
      • 1

      信息

      ID
      6842
      时间
      1000ms
      内存
      128MiB
      难度
      1
      标签
      (无)
      递交数
      42
      已通过
      31
      上传者