Created
December 1, 2009 19:43
-
-
Save russelnickson/246569 to your computer and use it in GitHub Desktop.
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^1000??
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a=2**1000 | |
b=0 | |
while a: | |
b=b+a%10 | |
a/=10 | |
print b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment