|  | 
|  | 
| back to board | :) My solution works 0.02 sec :)It needs only to find all primes from 2 to N and
 in addition - O(N) time
Re: :) > 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
Re: :)  i've got this1055 C Accepted  0.015 647 KB
 -------------------------------
 you should do a preprocess ,if m >= [n/2] ,let m be n - m.
Re: :) Posted by Denis  13 Sep 2007 02:58So what? I have a solution working 0.01 seconds. It uses Lezandr theorem. | 
 | 
|