Advertisement
danchaofan

Euler #28

Dec 5th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. steps, inc, total, runningtotal = 0, 2, 1, 1
  2. while steps < 500:
  3.     for x in range(4):
  4.         runningtotal += inc
  5.         total += runningtotal
  6.     steps += 1
  7.     inc += 2
  8.     print(steps)
  9. print(total)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement