Am 02.01.2016 um 14:14 schrieb yehudak .:

Thank you so much, but...
All that is Chinese for me.
Can you show a 'normal' Python code for me?

How about:

 >>> from math import log
 >>> sum([int(0.2**k*n) for k in range(1, int(log(n, 5))+1)])

}:-)

(That implements my procedure in my other answer.)

--
Robin Koch
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to