re: Project Euler #6 - Sum Square Difference VIEW POST

FULL DISCUSSION
 

Python!

def sum_square_difference(n):
    numbers = range(1, n+1)
    sum_squares = sum(i**2 for i in numbers)
    square_sum = sum(numbers)**2
    return square_sum - sum_squares

print(sum_square_difference(100))
 
code of conduct - report abuse