From d62ba829dc3a54edc46b7deb581dd244713393f5 Mon Sep 17 00:00:00 2001 From: mjfernez Date: Sun, 2 Dec 2018 19:12:42 -0500 Subject: add code --- sumexp.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sumexp.py (limited to 'sumexp.py') 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 -- cgit v1.2.3