6 条题解
-
-2
12224邵雨轩 (12224邵雨轩) LV 8 @ 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;
} -
-23 年前@
#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;
} -
-23 年前@
#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;
} -
-31 年前@
-
-43 年前@
-
-143 年前@
#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
- 分类
- (无)
- 标签
- 递交数
- 273
- 已通过
- 139
- 通过率
- 51%
- 被复制
- 7
- 上传者