mirror of
https://github.com/correl/euler.git
synced 2024-11-27 19:19:50 +00:00
Problem 016
git-svn-id: file:///srv/svn/euler@41 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
This commit is contained in:
parent
d3dba4b9cd
commit
d4dd1310ea
1 changed files with 7 additions and 0 deletions
7
e016.py
Normal file
7
e016.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
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)
|
Loading…
Reference in a new issue