diff options
Diffstat (limited to 'sumexp.py')
-rw-r--r-- | sumexp.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sumexp.py b/sumexp.py new file mode 100644 index 0000000..7e4a1f1 --- /dev/null +++ b/sumexp.py @@ -0,0 +1,10 @@ +import PIL, math +#Problem 16 Power digit sum +n = 2**1000 +strn = str(n) +s = 0 + +for i in strn: + s+=int(i) + +print s |