How to generate prime numbers up to 10^9 in 2.2 seconds?

Правка en2, от TUDORTEA, 2020-09-22 21:20:31

Link of the problem is https://www.spoj.com/problems/PRIMES2 .

Which algorithm should be used to solve this problem? And how wheelSieve + segmentedSieve is implemented?

Thank you in advance.

Теги #number theory, #primes, #sieve, prime number

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский TUDORTEA 2020-09-22 21:20:31 4 Tiny change: '? And how wheelSieve + segment' -> '? And how **wheelSieve** + segment'
en1 Английский TUDORTEA 2020-09-22 09:58:15 252 Initial revision (published)