Brute force
The naive approach consists of computing the sum of the series and then take the last 10 digits.
From solution1.py:
def self_powers():
return sum(i**i for i in range(1, 1001)) % 10**10
The naive approach consists of computing the sum of the series and then take the last 10 digits.
From solution1.py:
def self_powers():
return sum(i**i for i in range(1, 1001)) % 10**10