This is quite an interesting problem. I knew the efficient method for calculating the sum of primes below a large range without actually finding all the primes, but could not extend it to find the answer to this problem. So instead I used a segmented sieve to calculate the smallest prime factors which took about 8 hours :( .
No comments:
Post a Comment