6 条题解

  • -1
    @ 2023-12-03 14:24:35
    #include <stdio.h>
    #include <math.h>        
    int main()
    {
        double x1,y1,x2,y2,distance;
        scanf("%lf%lf%lf%lf", &x1,&y1,&x2,&y2);
        distance = sqrt( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) );  
        printf("%.3lf\n", distance);
        return 0;
    }
    
    
  • -1

    #include <stdio.h>
    #include <math.h>

    int main()
    {
    double x1,y1,x2,y2,distance;
    scanf("%lf%lf%lf%lf", &x1,&y1,&x2,&y2);
    distance = sqrt( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) );

    printf("%.3lf\n", distance);
    return 0;
    }

  • -1
    @ 2021-12-27 09:48:31

    #include <stdio.h>
    #include <math.h>

    int main()
    {
    double x1,y1,x2,y2,distance;
    scanf("%lf%lf%lf%lf", &x1,&y1,&x2,&y2);
    distance = sqrt( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) );

    printf("%.3lf\n", distance);
    return 0;
    }

  • -1

    #include <stdio.h>
    #include <math.h>

    int main()
    {
    double x1,y1,x2,y2,distance;
    scanf("%lf%lf%lf%lf", &x1,&y1,&x2,&y2);
    distance = sqrt( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) );

    printf("%.3lf\n", distance);
    return 0;
    }

  • -3
    #include <stdio.h>
    #include <math.h>        
    int main()
    {
        double x1,y1,x2,y2,distance;
        scanf("%lf%lf%lf%lf", &x1,&y1,&x2,&y2);
        distance = sqrt( (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) );  
        printf("%.3lf\n", distance);
        return 0;
    }
    
  • -13

    #include<iostream>
    #include<iomanip>
    #include<cmath>
    using namespace std;
    int main()
    {
    double x1,y1,x2,y2,dis;
    cin>>x1>>y1>>x2>>y2;
    dis=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
    cout<<fixed<<setprecision(3)dis<<endl;
    return 0;
    }

  • 1

信息

ID
1647
难度
3
分类
(无)
标签
递交数
236
已通过
119
通过率
50%
被复制
6
上传者