Project Euler #48 : Self Powers

The series, 11 + 22 + 33 + … + 1010 = 10405071317.

Find the last ten digits of the series, 11 + 22 + 33 + … + 10001000.
This problem was solved easily with Python, due to arbitrary length constraints on numbers.

import math

foo = 1
total = 0

while(foo <= 1000):
	total += foo**foo
	foo += 1

print total % 10000000000

Leave a Reply

Your email address will not be published. Required fields are marked *