|
|
вернуться в форумFilippov Nickolas SSAU#2's AC program is HERE! program rope; var n,i:integer; r:extended; a:array[1..100] of record x,y:extended; end; res:extended; begin read(n); read(r); res:=0; for i:=1 to n do Readln(a[i].x,a[i].y); for i:=2 to n do res:=res+sqrt(sqr(a[i].x-a[i-1].x)+sqr(a[i].y-a[i- 1].y)); res:=res+sqrt(sqr(a[n].x-a[1].x)+sqr(a[n].y-a[1].y)); res:=res+2*pi*r; writeln(res:0:2); end. |
|
|