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 1011. Conductors

Please 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...