|
|
back to boardPlease help me! Posted by t 28 Dec 2005 10:28 Program P10112; Var i,a,b,c:Extended; Begin Read(a,b); a:=a/100; b:=b/100; If a>b Then Begin c:=a; a:=b; b:=c; End; i:=1; WHile (Trunc(i*a)=Trunc(i*b)) or ((Abs(i*b-Trunc(i*b))<=0.00000000000000001) and (Trunc(i*b)-Trunc(i*a)=1)) do i:=i+1; WRiteln(i:0:0); ENd. I don't know... Posted by Alexey 2 Mar 2006 13:24 I've tested your program with the Random tests and compare your answers with my AC program's; About 200 tests - No Difference... Try to use longint... |
|
|