[Tutor] OverflowError in lucky numbers script
__peter__ at web.de
Mon Jan 23 14:44:08 CET 2012
Shreesh bhat wrote:
> I tried optimizing everything all things you guys pointed out and still
> its orders of magnitude away from the expected result.
> The program should check the islucky condition between range of (1,10**18)
> numbers and iterate over that 10**5 times.
> This program slows down more than 16 secs at (1,10**8) and 1 time.
> Which approach should i follow?
Consult the person who gave you this task -- there is no way python can even
count to 10**18 in 16 seconds.
More information about the Tutor