you can always guestimate your upper bound for the time limit.... :) Just to let you all know, the numbers can get to be quite big...
On 11 Nov, 09:41, Cerebrus <[EMAIL PROTECTED]> wrote: > CK, > > You haven't mentioned the method you used to obtain your results. I > wonder if you used the Sieve of Eratosthenes.. supposedly the fastest > method. Only problem is that it requires an upper bound on the largest > number to evaluate. In your challenge, you have set a time limit, > instead. > > On Nov 11, 2:10 pm, CK <[EMAIL PROTECTED]> wrote: > > > > > This is something I've been working on for a while, and I thought it > > might be fun to push it out to the group to see if anyone can better > > my efforts. > > > The challange is to write a Windows Console App that generates prime > > numbers. It does not need to generate them in any specific order, > > record them, or even catch all primes. The aim is to calculate as > > many unique primes as possible in 10 seconds. > > > Obviously, this will depend on the processor it runs on, so that will > > be taken into account. > > > Once you have a solution, please post your results like the following: > > (this is example data only) > > > CPU: Intel E6300 > > Cores: 2 > > RAM: 1GB > > OS: Vista Home Premium > > .Net: 3.5 > > Number of primes in 10 seconds: 10,000 > > Highest Prime found: 123247 > > > To confirm your code is working properly, please post some large > > primes (~100000) your code has found to verify that it is working > > correctly. > > > Please also be willing to share your code. > > > Please enter, just for fun, and enjoy :) > > > PS. A Prime is a number that is only divisible by itself and 1. 1 is > > not a prime, 2 is, 3 is, 4 isn't, 5 is etc.- Hide quoted text - > > - Show quoted text -
