CodeForces 507BAmr and Pins

xiaoxiao2021-02-28  15

http://codeforces.com/problemset/problem/507/B

水题

#include<iostream> #include<cstring> #include<algorithm> #include<cstdio> #include<cmath> using namespace std; int main() { double r,x,y,xx,yy; while(cin>>r>>x>>y>>xx>>yy) { double res=sqrt((xx-x)*(xx-x)+(yy-y)*(yy-y)); res/=r*2; int ans=(int)res; if(ans!=res) ans++; cout<<ans<<endl; } return 0; }
转载请注明原文地址: https://www.6miu.com/read-2800110.html

最新回复(0)