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

I don't kown why I got WA?
Posted by PanYe 23 Dec 2005 16:45
Program p1011;
Var
    a,b,c:extended;
    i:Longint;
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) Do i:=i+1;
    If ABs((Trunc(i/a)+1)*a-i)>0.00000000001 Then Writeln(Trunc(i/a)+1) Else Writeln(Trunc(i/a)+2);
End.