|
|
back to boardAccepted SHORT uses math; var len,r:extended; begin read(len,r); if(r<=len/2)then writeln((pi*r*r):0:3) else if(sqrt(2)*len/2<=r)then writeln((len*len):0:3) else writeln((pi*r*r-4*arccos(len/r/2)*r*r+2*len*sqrt(r*r-len*len/4)):0:3); end. |
|
|