euler/e016.py
Correl Roush d4dd1310ea Problem 016
git-svn-id: file:///srv/svn/euler@41 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
2010-04-12 15:53:20 +00:00

7 lines
125 B
Python

n = 2**1000
s = str(n)
total = 0
for c in s:
total = total + int(c)
print 'Sum of digits for {0}: {1}'.format(n, total)