|
|
back to boardSome tips (got AC using 0.031s) Posted by Adrian 3 Oct 2010 19:35 First, triviality of 1 is 0. Second, we can judge number i from 2 to 1000000, if i is a prime number, then prime[i] is true. Third, we traversal i from b to a, because if j>i and prime[j]==true, prime[i]==true, we can get 1/j<1/i. if we get prime[i]==true,just output it and break. if we can not get such a number, calculate triviality of i and output the minimum. Thus, we can get AC with a little time spended,but larger memory. My English is poor, if you cannot understand me, I would say sorry for it.^__^ Re: Some tips (got AC using 0.031s) your english are good) i got it. may be i got it because my solution is similar yours=) Re: Some tips (got AC using 0.031s) but i got AC using 0.1s Re: Some tips (got AC using 0.031s) Your english good enouth to speak with Russians) |
|
|