mirror of
https://github.com/correl/euler.git
synced 2024-11-27 11:09:54 +00:00
7 lines
125 B
Python
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)
|