Moved solutions till 35 to Python.
This commit is contained in:
12
python/e028.py
Normal file
12
python/e028.py
Normal file
@@ -0,0 +1,12 @@
|
||||
def euler_028():
|
||||
total = 1
|
||||
current_corner = 3
|
||||
for n in range(3, 1002, 2):
|
||||
total += 4 * current_corner + 6 * (n - 1)
|
||||
current_corner += 4 * n - 2
|
||||
return total
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("e028.py: {}".format(euler_028()))
|
||||
assert(euler_028() == 669171001)
|
||||
Reference in New Issue
Block a user