# This Python file uses the following encoding: utf-8
# 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
# What is the sum of the digits of the number 21000?
import time
start = time.time()
print "2**1000‘s sum of digits is %s and cost %s seconds" % (sum([int(i) for i in str(2**1000)]), time.time() - start)
时间: 2024-12-22 23:43:01