|
|
back to boardMy solution works 0.02 sec :) It needs only to find all primes from 2 to N and in addition - O(N) time > My solution works 0.02 sec :) > It needs only to find all primes from 2 to N and > in addition - O(N) time 0.02 sec !!! Must be an extremely clever solution ... Could you give any further hint following the O(N) hint you gave us already ??? Thanks, LG i've got this 1055 C Accepted 0.015 647 KB ------------------------------- you should do a preprocess ,if m >= [n/2] ,let m be n - m. So what? I have a solution working 0.01 seconds. It uses Lezandr theorem. |
|
|