Thursday, March 21, 2013

project euler problem 047

Distinct primes factors

I revisited this problem tonight, I found it was the first problem involving factors. In many PE problems, factor plays a significant role. 

I am pretty sure that when I started working on PE problems, I had no idea that sieve method can help to find factor or number of distinct factors. I thought that sieve method was only used to create prime table

I learned sieve method for factor when I tried to solve a problem numbered around 200 simply because my method was too slow. 

Please review the discussion thread if your method is not elegant. 

No comments:

Post a Comment