- 绕钉子的长绳子
- 2015-07-05 13:22:59 @
啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊
2 条评论
-
疯-神 LV 8 @ 2015-07-05 13:32:05
累死
-
2015-07-05 13:31:48@
var
dx,dy:array[0..100] of real;
n,i:longint;
s,r:real;
begin
readln(n,r);
for i:=1 to n do
begin
read(dx[i-1]);
readln(dy[i-1]);
end;
s:=2*r*3.1415;
for i:=1 to n do
s:=s+sqrt(sqr(abs(dx[i-1]-dx[i mod n]))+sqr(abs(dy[i-1]-dy[i mod n])));
writeln(s:0:2);
end.AC
- 1