|
|
back to boardCommon Board1011. What's wrong with Trunc in Pascal? 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 Yes! How much happiness you get after all those WAs when you get AC! That was a real torture! |
|
|