euler/e048.py
Correl Roush 0be427137c Problem 048
git-svn-id: file:///srv/svn/euler@55 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
2010-04-28 17:18:51 +00:00

11 lines
219 B
Python

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:]