- 绕钉子的长绳子
- 2009-08-03 10:17:15 @
var
n,i,j,k:integer;
sum,r:real;
x,y:array[1..101] of real;
begin
read(n,r);
for i:=1 to n do
read(x[i],y[i]);
x[n+1]:=x[1];
y[n+1]:=y[1];
sum:=2*pi*r;
for i:=1 to n do
sum:=sum+sqrt(sqr(x[i]-x)+sqr(y[i]-y));
write(sum:0:2);
end.
15行……
5 条评论
-
另刂石欠木又寸 LV 8 @ 2016-07-10 14:11:10
少是少,不过没对
-
2016-02-03 21:05:47@
我想应该是…………
-
2016-02-03 21:04:47@
sqr(x[i]-x)不对,x是什么类型?
-
2015-06-13 21:27:40@
不过sum:=sum+sqrt(sqr(x[i]-x)+sqr(y[i]-y));的x,y是什么呢?
-
2015-06-13 21:26:03@
Er……
好吧
- 1