euler/python/e016.py

8 lines
137 B
Python

def euler_016():
s = sum(map(int, str(2**1000)))
return s
assert(euler_016() == 1366)
print("e016.py: {}".format(euler_016()))