mirror of
https://github.com/correl/euler.git
synced 2024-11-27 11:09:54 +00:00
Problem 048
git-svn-id: file:///srv/svn/euler@55 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
This commit is contained in:
parent
4faaf8c80a
commit
0be427137c
1 changed files with 11 additions and 0 deletions
11
e048.py
Normal file
11
e048.py
Normal file
|
@ -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:]
|
Loading…
Reference in a new issue