3 条题解

  • 0
    @ 2025-10-4 16:51:39

    #include<stdio.h>

    #include<math.h>

    int main(){

    double x1,y1,x2,y2,m;

    int n;

    scanf("%d",&n);

    while(n--){

    scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);

    m=(x1-x2)(x1-x2)+(y1-y2)(y1-y2);

    m=sqrt(m);

    printf("%.2f\n",m);

    }

    return 0;

    }

    • 0
      @ 2024-10-15 8:41:13

      #include <stdio.h>

      #include <math.h>

      int main()

      {

      int n;

      scanf("%d",&n);

      for(int i=0;i<n;i++){

      double x1,y1,x2,y2;

      scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);

      double a=sqrt((x1-x2)(x1-x2)+(y1-y2)(y1-y2));

      printf("%.2lf\n",a);

      }

      return 0;

      }

      • 0
        @ 2023-10-9 1:42:32
        #include<stdio.h>
        #include<math.h>
        int main()
        {
            int n;
            scanf("%d",&n);
            while(n--)
            {
                double x1,y1,x2,y2;
                double dist;
                scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
                dist=sqrt(pow((x1-x2),2)+pow((y1-y2),2));
                 printf("%.2lf\n",dist);
            }
            return 0;
        }
        
        • 1

        信息

        ID
        164
        时间
        3000ms
        内存
        128MiB
        难度
        6
        标签
        (无)
        递交数
        1111
        已通过
        300
        上传者