Commits

Steve McConville  committed ecf4463

solved this one with maths knowledge

  • Participants
  • Parent commits d9f5598

Comments (0)

Files changed (1)

File 6/solution.py

+def euler6():
+    n = 100
+    f = lambda n: sum(range(n+1))**2 - (2*n**3 + 3*n**2 + n)/6 # squared triangle, square pyramidal
+    assert f(10) == 3025
+    print f(n)