$ 2 ^ {15} = 32768 $, and the sum of the numbers (the sum of each digit) is $ 3 + 2 + 7 + 6 + 8 = 26 $. Similarly, find the finger sum of $ 2 ^ {1000} $.
Python
# n = 15
n = 1000
result = sum(map(int, str(2 ** n)))
print result
print result == 1366
result
1366
True
Recommended Posts