|
|
back to boardI need help(WA 17) Posted by Mad man 30 Apr 2006 18:55 I do not see error here, but didn't pass the 17'th test var p,q: extended; a,b: longint; BEGIN read(p,q); p:=p/100; q:=q/100; a:=1; while (true) do begin b:=1; while (a/b>=q) do inc(b); if (a/b>p) then begin write(b); halt(0); end else inc(a); end; END. Re: I need help(WA 17) Me, too. I'm getting insane. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA!!!!!!!!!!!!! Re: I need help(WA 17) Use epsilon! Instead of >= q and > p use >= q-eps and > p+eps and you'll get AC. Good luck! ;) Re: I need help(WA 17) Posted by wefgef 4 Jun 2006 19:03 this eps thing sucks :( Re: I need help(WA 17) ??? Use epsilon! Instead of >= q and > p use >= q-eps and > p+eps and you'll get AC. Good luck! ;) who can say me, what is epsilon??? how to use it Re: I need help(WA 17) Posted by svr 21 Feb 2007 22:24 eps=0.000000001 Re: I need help(WA 17) Thank You!!! I got AC!!! with eps! Re: I need help(WA 17) thanks |
|
|