mirror of
https://github.com/correl/euler.git
synced 2024-11-24 03:00:08 +00:00
Problem 028
git-svn-id: file:///srv/svn/euler@57 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
This commit is contained in:
parent
fb13b3ce62
commit
3807d9f5bf
1 changed files with 14 additions and 0 deletions
14
e028.py
Normal file
14
e028.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
n = 1
|
||||||
|
total = 1
|
||||||
|
size = 1
|
||||||
|
|
||||||
|
MAX_SIZE = 1001
|
||||||
|
|
||||||
|
while size <= MAX_SIZE:
|
||||||
|
for i in range(4):
|
||||||
|
n = n + (size - 1)
|
||||||
|
if n > 1:
|
||||||
|
total = total + n
|
||||||
|
size = size + 2
|
||||||
|
|
||||||
|
print 'Total:', total
|
Loading…
Reference in a new issue