The point of a lot of these challenges is to be smart with your math as well 
as your code.  A brute force approach isn't going to work very well, 
especially in this case.  An integer with 7^20 trailing zeros isn't even 
going to fit in your RAM.

An observation: every trailing zero implies a factor of ten, which in primes 
is two and five.  So the final number will have at least 7^20 twos and fives 
in its prime factorization.

Exploiting this fact in a clever way is probably one way to solve this 
problem.

Cheers
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to