|
|
back to boardDiscussion of Problem 1020. RopeDamn! very Nice! Nice program!!! I didnt Care that for around of niles we should just calculate 2*r*pi!!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var r,x0,y0,x1,x2,y1,y2 :real; n,i :byte; begin readln(n,r); r:=2*r*pi; readln(x0,y0); x1:=x0; y1:=y0; for i := 2 to n do begin x2:=x1; y2:=y1; readln(x1,y1); r:=r+sqrt(sqr(x1-x2)+ sqr(y1-y2)); end; r:=r+sqrt(sqr(x0-x1)+ sqr(y0-y1)); writeln(r:0:2); readln; end. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Aidin_n7 |
|
|