Euler Problem 48

The series, $1^1 + 2^2 + 3^3 + \cdots + 10^{10} = 10405071317$.

Find the last ten digits of the series, $1^1 + 2^2 + 3^3 + \cdots + 1000^{1000}$.


In [1]:
print(sum(pow(k, k, 10**10) for k in range(1, 1001)) % 10**10)


9110846700