aboutsummaryrefslogtreecommitdiffstats
path: root/sumexp.py
diff options
context:
space:
mode:
authormjfernez <mjfernez@gmail.com>2018-12-02 19:12:42 -0500
committermjfernez <mjfernez@gmail.com>2018-12-02 19:12:42 -0500
commitd62ba829dc3a54edc46b7deb581dd244713393f5 (patch)
tree637d985d70fff70c4dedc14a45c559747ea18b84 /sumexp.py
parentc15221f10ed2ea4a55b474a57b6ee39f6b24ac85 (diff)
downloadProject_Euler_Solutions-d62ba829dc3a54edc46b7deb581dd244713393f5.tar.gz
add code
Diffstat (limited to 'sumexp.py')
-rw-r--r--sumexp.py10
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