"""
Self Powers
Problem 48

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

Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000.
"""


def solution():
    """Returns the last 10 digits of the series, 11 + 22 + 33 + ... + 10001000.

    >>> solution()
    '9110846700'
    """
    total = 0
    for i in range(1, 1001):
        total += i ** i
    return str(total)[-10:]


if __name__ == "__main__":
    print(solution())

@@ -30,34 +30,37 @@
 he series, 1
+%5E
 1 + 2
+%5E
 2 + 3
+%5E
 3 + ... + 10
@@ -59,16 +59,17 @@
 ... + 10
+%5E
 10 = 104
@@ -116,34 +116,37 @@
 he series, 1
+%5E
 1 + 2
+%5E
 2 + 3
+%5E
 3 + ... + 10
@@ -143,24 +143,25 @@
 + ... + 1000
+%5E
 1000.%0A%22%22%22%0A%0A%0A
@@ -183,16 +183,21 @@
 %0A    %22%22%22
+%0A    
 Returns 
@@ -235,18 +235,21 @@
 s, 1
+%5E
 1 + 2
+%5E
 2 + 3
+%5E
 3 + 
@@ -258,16 +258,17 @@
 . + 1000
+%5E
 1000.%0A%0A 

Update sol1.py (#2455)