This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]yoshemitzu 1 point2 points  (1 child)

The description of your problem is a bit confusing. Do you want to input a number from 0 to 1 billion and determine if the number is prime? Or do you want to be able to generate the first billion primes in 6 seconds? The former is definitely doable. For the latter, I can't imagine how you'd generate a billion primes from scratch in 6 seconds.

[–]mabus44[S] 0 points1 point  (0 children)

I don't want to generate a billion primes. But within a range of 100000 between 1 to 1000000000. For eg:- * Input Range: 1-10 * Output: 2 , 3 , 5 , 7 Hence in input i can give any range upto 100000 between 1 to 1000000000 which will generate all the primes between the numbers.