Wednesday, August 28, 2013

project euler problem 418

Factorisation triples

This is an easy problem. When the problem is posted, I felt that it is not very difficult. It looks like similar to problem 266, but I did not play with it seriously. Today, I still do not have too much clue on it.  I tried to answer some fundamental questions like "how to express 43! in terms of prime numbers and how many factors does 43! have". After a while, I see what I need to do. I implemented some simple code and it takes 500 seconds to get the answer! It is slow, however the answer is correct. I optimized my code and tried to start searching in a different place. It only takes 5 seconds to get the answer.

No comments:

Post a Comment