python-euler/solutions/016/powerdigitsum.py

6 lines
76 B
Python

digitSum = 0
for i in str(2**1000):
digitSum += int(i)
print(digitSum)