diff options
author | mjfernez <mjfernez@gmail.com> | 2020-02-09 15:16:26 -0500 |
---|---|---|
committer | mjfernez <mjfernez@gmail.com> | 2020-02-09 15:16:26 -0500 |
commit | 93ea7fe5957b62f18e8fbd17a21696bd7de6332d (patch) | |
tree | d90aed60d687bcf195f1150777f37cbe8a149814 /16-Power-Digit-Sum | |
parent | 125ec5bc3d8bfc224b7d32bcfbbc37b9fb5d441f (diff) | |
download | Project_Euler_Solutions-93ea7fe5957b62f18e8fbd17a21696bd7de6332d.tar.gz |
Organized everything, update README
Diffstat (limited to '16-Power-Digit-Sum')
-rw-r--r-- | 16-Power-Digit-Sum/sumexp.py | 9 |
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) |