|
|
back to boardShow all messages Hide all messagesJust full search. ~O(sqrt(N)) in the worst case. To avoid TL before search do: C = GCD(A,B); A /= C; B /= C; N -= (N%C); Think why you always can do this. GOOD LUCK! Oh! I forgot, that after that N must be divided by C too :) got AC now. thanx again & HAPPY NEW YEAR!!! |
|
|