- 绕钉子的长绳子
- 2016-07-09 22:17:14 @
var i,n,m:longint;
ans,a,b,c,d,x,y:real;
begin
ans:=0;
readln(n,m);
readln(a,b);c:=a;d:=b;
for i:=2 to n do
begin
readln(x,y);
ans:=ans+sqrt(sqr(x-a)+sqr(y-b));
a:=x;b:=y;
end;
ans:=ans+sqrt(sqr(a-c)+sqr(b-d));
ans:=ans+pi*2*m;
writeln(ans:0:2);
end.
1 条评论
-
贱人在我右边 LV 9 @ 2017-01-14 09:33:25
还好,有一点问题
- 1