no its fine to inlclude that number, you could hard code ALL of the prime numbers and just display them, but your code wouldnt get many marks for sexynesss :) i think most people will be using one or two hard coded primes :)Quote:
Originally posted by ntg
This is not a solution to a generalized problem, so I don't think that you would break any rules if you use 7919. After all, you can use prime theory to find that out without actually calculating all primes up to 7919. The scope of the contest is very limited so I wouldn't think that anybody would mind your using the number, unless of course Electroman says otherwise. If the contest was about calculating the first n primes (n entered by user and always larger than 1,000,000), that would be a different story, if you needed the last prime you would actually have to calculate it on the spot and it would affect your timing. But then again, in such a case I'm willing to bet that most of our algorithms would break or would be slower than 50,000,000 primes per second.
BTW, last accomplished time is 0,025 ms. This was entertaining, looking forward to see Merri's code and for the next contest.
Cheers,
NTG
