|
|
back to boardit accepted! Posted by Jumbo 22 Mar 2011 16:29 var w,g,h,l,t:real; begin g:=981; read(l,h,w); if l/2>h then begin write('butter'); halt end; t:=sqrt(2*(h-l/2)/g); w:=frac(w*t/60); if ((w>=0) and (w<=1/4)) or ((w>=3/4) and (w<=1)) then write('butter') else write('bread'); end. Re: it accepted! Posted by Jumbo 23 Mar 2011 16:01 var w,h,l:real; begin read(l,h,w); if l/2>h then begin write('butter'); halt end; if ((frac(w*sqrt(2*(h-l/2)/981)/60)>=0) and (frac(w*sqrt(2*(h-l/2)/981)/60)<=1/4)) or ((frac(w*sqrt(2*(h-l/2)/981)/60)>=3/4) and (frac(w*sqrt(2*(h-l/2)/981)/60)<=1)) then write('butter') else write('bread'); end. |
|
|