diff --git a/e048.py b/e048.py new file mode 100644 index 0000000..6f19eaa --- /dev/null +++ b/e048.py @@ -0,0 +1,11 @@ +def powerseries(n): + i = 1 + total = 0 + while i <= n: + total = total + i**i + i = i + 1 + return total + +if __name__ == '__main__': + val = str(powerseries(1000)) + print 'Last 10:', val[-10:]