aboutsummaryrefslogtreecommitdiffstats
path: root/16-Power-Digit-Sum
diff options
context:
space:
mode:
authormjfernez <mjfernez@gmail.com>2020-02-09 15:16:26 -0500
committermjfernez <mjfernez@gmail.com>2020-02-09 15:16:26 -0500
commit93ea7fe5957b62f18e8fbd17a21696bd7de6332d (patch)
treed90aed60d687bcf195f1150777f37cbe8a149814 /16-Power-Digit-Sum
parent125ec5bc3d8bfc224b7d32bcfbbc37b9fb5d441f (diff)
downloadProject_Euler_Solutions-93ea7fe5957b62f18e8fbd17a21696bd7de6332d.tar.gz
Organized everything, update README
Diffstat (limited to '16-Power-Digit-Sum')
-rw-r--r--16-Power-Digit-Sum/sumexp.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/16-Power-Digit-Sum/sumexp.py b/16-Power-Digit-Sum/sumexp.py
new file mode 100644
index 0000000..a4d8eaf
--- /dev/null
+++ b/16-Power-Digit-Sum/sumexp.py
@@ -0,0 +1,9 @@
+# Problem 16 Power digit sum
+n = 2**1000
+strn = str(n)
+s = 0
+
+for i in strn:
+ s += int(i)
+
+print(s)