way to calculate 2**1000 without expanding it?
Arnaud Delobelle
arnodel at gmail.com
Fri Sep 16 16:00:24 EDT 2011
On 16 September 2011 20:21, zombie <thatiparthysreenivas at gmail.com> wrote:
> Hi guys,
> i am writing a program to sum up the digits of a number 2**1000?
> Is there a way/formula to do it without expanding it?
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
In base 2, the answer is 1 :)
Hopefully-helpfully-but-not-so-sure'ly yours,
--
Arnaud
More information about the Python-list
mailing list