- 绕钉子的长绳子
- 2009-07-23 14:07:53 @
program p1007;
var s,a,b,x,y,x1,y1,r:real;
n,i:integer;
begin
read(n,r);
read(x1,y1);
s:=0;
x:=x1;y:=y1;
for i:=2 to n do
begin
readln(a,b);
s:=s+sqrt(sqr(a-x)+sqr(b-y));
x:=a;
y:=b;
end;
s:=s+sqrt(sqr(a-x1)+sqr(b-y1));
s:=s+2*r*3.1415926;
write(s:0:2);
end.
0 条评论
目前还没有评论...