A few more problems!

This commit is contained in:
2016-02-06 21:26:44 -08:00
parent 4b019a9f2e
commit 3d42c5a27b
6 changed files with 212 additions and 0 deletions

14
problem_16.py Normal file
View File

@@ -0,0 +1,14 @@
import math
#print the sum of the digits of 2^1000
product = str('%f' % math.pow(2, 1000))
sum = 0
for char in product:
if char == '.': # I can't really be bothered to do the conversion
break
sum += int(char)
print(product)
print(sum)