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

Common Board

1011. What's wrong with Trunc in Pascal?
Posted by Michael_Rybak 14 Oct 2001 01:02
Can you tell me what's wrong with this solution:
Program Conductors;
 Var p,q:Real;
     i:Longint;
Begin
 Read(p,q);
 For i:=1 To 50000 Do
  If Trunc(p*i/100) <> Trunc(q*i/100) Then Begin
   Writeln(i);
   Exit;
  End;
End.
YEEEEEEEEEEEEHAAAWWWWWWWWWWWW!!!!!!!!!!!!!!!!!!!! ACCEPTED AT LAST
Posted by Michael_Rybak 14 Oct 2001 01:13
Yes!
How much happiness you get after all those WAs when you get
AC! That was a real torture!