Project Euler

Problem 6: Sum Square Difference

Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum. Run this solution at repl.io here.

      
        squares = [x**2 for x in range(1,101)]
        SumOfSquares = sum(squares)

        SquareOfSum = (sum(list(range(1,101))))**2

        print(SquareOfSum - SumOfSquares)
      
    

back to code menu