|
Thanks for the tips, Cerulean.
The final function I ended up writing executed almost instantly when given a 12-digit number, as opposed to the previous function, which took over a minute.
In case anyone's interested, this problem came from a USACO challege; now I have to re-write it in C++ or Java in order to submit it. (I wrote in Python to get experience with the language.) If anyone knows of a site with Python-specific challenges, I would be very interested...
Last edited by titaniumdecoy; Jun 9th, 2006 at 8:04 PM.
|