Return to Snippet

Revision: 27503
at June 11, 2010 23:05 by chroto


Initial Code
#!/usr/bin/python

# Project Euler - Problem 28

# Find the sum of the diagonals of a 1001x1001 spiral



n = 1001
sum = 1

for x in range(1001,1,-2):
    sum += ((x**2) << 2) - (6*x) + 6
    
print sum

Initial URL

                                

Initial Description

                                

Initial Title
Project Euler - Problem 28

Initial Tags

                                

Initial Language
Python