题解 | #点的距离#
点的距离
https://www.nowcoder.com/practice/3468bd027c5a410e895150b0d5b13502
#include <iomanip>
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int n;cin>>n;
while(n--){
double a,b,c,d;
cin>>a>>b>>c>>d;
cout<<fixed<<setprecision(2)<<sqrt(pow(c-a,2)+pow(d-b,2))<<endl;
}
}
// 64 位输出请用 printf("%lld")
查看14道真题和解析