1 solutions

  • 0
    @ 2024-7-20 19:58:04

    这题的核心就是勾股 不会有人学信竞连勾股都不会吧

    #include<bits/stdc++.h>
    using namespace std;
    double xa,ya,xb,yb;
    int main(){
    	cin>>xa>>ya;
    	cin>>xb>>yb;
    	double a=(xa-xb)*(xa-xb);
    	double b=(ya-yb)*(ya-yb);
    	cout<<fixed<<setprecision(3)<<sqrt(a+b);
    	return 0;
    }
    
    • 1

    Information

    ID
    6874
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    1
    Tags
    # Submissions
    6
    Accepted
    5
    Uploaded By