On 22/06/2011 02:21, John Salerno wrote:
::sigh:: Well, I'm stuck again and it has to do with my get_factors
function again, I think. Even with the slight optimization, it's
taking forever on 20! (factorial, not excitement)  :) It's frustrating
because I have the Python right, but I'm getting stuck on the math.

The problem:

"What is the smallest positive number that is evenly divisible by all
of the numbers from 1 to 20?"

You don't need factorials, just remember that each of the numbers can
be expressed as the product of a multiset of prime factors.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to