• <input id="auww4"></input>
  • <input id="auww4"><acronym id="auww4"></acronym></input>
  • <input id="auww4"><u id="auww4"></u></input>
    <object id="auww4"><acronym id="auww4"></acronym></object>
    <menu id="auww4"></menu><input id="auww4"><u id="auww4"></u></input>
    <input id="auww4"><u id="auww4"></u></input>
  • F.A.Q
    Hand In Hand
    Online Acmers
    Forum | Discuss
    Statistical Charts
    Problem Archive
    Realtime Judge Status
    Authors Ranklist
     
         C/C++/Java Exams     
    ACM Steps
    Go to Job
    Contest LiveCast
    ICPC@China
    Best Coder beta
    VIP | STD Contests
    Virtual Contests
        DIY | Web-DIY beta
    Recent Contests
    Author ID 
    Password 
     Register new ID

    注意精確度啊,大不了全不用int 都用double

    Posted by hhhh999 at 2020-11-06 23:14:12 on Problem 2001
    (0)  


    #include<iostream>
    #include<cstdio>
    #include<math.h>
    int main(){
      double a1,b1,a2,b2;
      while(scanf("%lf %lf %lf %lf",&a1,&b1,&a2,&b2)==4){
     double w;
      w=(a1-a2)*(a1-a2)+(b1-b2)*(b1-b2);
      w=pow(w,0.5);
       printf("%.2lf\n",w);
    }
      return 0;
    }


    Post your reply here:

    Author ID
    Password
    Title
    Content  
     
    Hangzhou Dianzi University Online Judge 3.0
    Copyright © 2005-2020 HDU ACM Team. All Rights Reserved.
    Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
    Total 0.000000(s) query 5, Server time : 2020-11-09 02:27:22, Gzip enabled
    棋牌