Self powers : Problem 48 Euler Project
The series, 11 + 22 + 33 + ... + 1010 = 10405071317.
Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000.
Python Code
def selfPower():
sumT = 0
for i in range(1000):
i = i+1
sumT = sumT + (i**i)%10000000000
print "last ten digits of the sum:",sumT%10000000000
selfPower()
Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000.
Python Code
def selfPower():
sumT = 0
for i in range(1000):
i = i+1
sumT = sumT + (i**i)%10000000000
print "last ten digits of the sum:",sumT%10000000000
selfPower()
No comments:
Post a Comment