Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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?
- #Analysis
- #Calculate 21000, split the digits and add them together.
- digits = str(2**1000)
- acc = 0
- for i in range(len(digits)):
- acc += int(digits[i])
- print acc
Advertisement
Add Comment
Please, Sign In to add comment