POP1 on SPOJ

Правка en2, от serasesi, 2017-11-30 11:01:15

Hi, I was solving POP1 but can't get it to pass under the time limit.

Things I've tried.

  1. For detecting pop numbers, I simply brute force.
  2. For checking primes, I maintain an array of primes till 2e7 and after that apply Miller-Rabbin.

Here is my code.

Теги primes, spoj, pop1

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский serasesi 2017-11-30 11:01:15 2 Tiny change: 'e tried.\n1. For d' -> 'e tried.\n\n1. For d'
en1 Английский serasesi 2017-11-30 11:00:39 347 Initial revision (published)