Trailing zeros of 100!

Serhiy Storchaka storchaka at gmail.com
Sat Jan 2 13:28:36 EST 2016


On 02.01.16 18:33, Tim Chase wrote:
> or mathematically:
>
>    sum(1 for _ in itertools.takewhile(
>      lambda x: n % (10**x) == 0,
>      itertools.count(1)))

The mathematician would prove that the result is not larger than 100/4.





More information about the Python-list mailing list