- 绕钉子的长绳子
- 2009-06-19 17:07:05 @
program Background;
var
a,b:array[1..100] of real;
n,i:integer;
r,s,c,l:real;
begin
read(n,r);
for i:=1 to n do read(a[i],b[i]);
for i:=1 to n-1 do
begin
c:=sqr(a[i]-a)+sqr(b[i]+b);
l:=sqrt(c)+l;
c:=0;
end;
s:=3.1415926*sqr(r)+sqrt(sqr(a[1]-a[n])+sqr(b[1]+b[n]));
write(l+s:4);
end.
如何修改才能通过?
0 条评论
目前还没有评论...