Project Euler #118: Pandigital prime sets

  • + 0 comments

    Maintain a boolean array for very fast primality check sieving for n <= 10^k, then use a fast primality test (e.g.: Miller-Rabin) for n > 10^k. My code passes all tests sieving for either 10^6, 10^7 and 10^8.

    If you are already doing that, you need to optimize somewhere else :)