euler/e028.py
Correl Roush 3807d9f5bf Problem 028
git-svn-id: file:///srv/svn/euler@57 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
2010-05-03 22:40:23 +00:00

14 lines
208 B
Python

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