Project Euler 16: (Iron)Python
- by Ben Griswold
In my attempt to learn (Iron)Python out in the open, here’s my solution for Project Euler Problem 16.
As always, any feedback is welcome.
# Euler 16
# http://projecteuler.net/index.php?section=problems&id=16
# 2^15 = 32768 and the sum of its digits is
# 3 + 2 + 7 + 6 + 8 = 26.
# What is the sum of the digits of the number 2^1000?
import time
start = time.time()
print sum([int(i) for i in str(2**1000)])
print "Elapsed Time:", (time.time() - start) * 1000, "millisecs"
a=raw_input('Press return to continue')