PersonalCorpus 版 (精华区)

156893 14:11:59 7 Mar 2002
Bozhang,HIT,P.R.China 1084 Pascal Accepted 0.03 sec 168K


uses math;
var
    h,r,res:extended;
begin
    readln(h,r); h:=h/2;
    if r>h*sqrt(2) then res:=h*h*4
        else if h>=r then res:=Pi*r*r else begin
            res:=Pi*r*r;
            res:=res- arccos(h/r)*4*r*r+4*h*sqrt(r*r-h*h);
        end;
    writeln(res:0:3);
end.
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.734毫秒