ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1084. Goat in the Garden

why i got CE????
Posted by Stanica Andrei 7 Feb 2005 17:46
const p=3.1415926535897932384626433832795;
var arccos,x,as,at,ah,a,b,l,r:real;

begin
read(l,r);
if r>=l*sqrt(2) then
  writeln(l*l:0:3)
else
  if r<=l / 2 then
    writeln(p*r*r:0:3)
  else
    begin

      x:=l/(2*r);
      b:=l/2;
      ArcCos := ArcTan (sqrt (1-sqr (x)) /x);
      as:=arccos*r*r;
      at:=b*sqrt(r*r-b*b);
      ah:=as-at;
      a:=p*r*r;
      a:=a-4*ah;
      writeln(a:0:3);
    end;
end.


i tested it with BP 7.0 and FP 1.0.10 both on windows... what's wrong?
"as" is a reserved word.
Posted by Vlad Veselov [PMG17,Vinnitsa - KNU,Kiev] 7 Feb 2005 19:00
754129 18:57:25
7 фев 2005 TECTOBOP 1084 Pascal Wrong Answer 6 0.015 143 КБ
Re: why i got CE????
Posted by Toster 18 Sep 2006 03:29
1.'as' is keyword like 'while' or 'if'
2.to have AC 'if r>=l*sqrt(2) then' ---> 'if r>=l*sqrt(2)/2 then'