Problem 6: Sum square difference
Problem Explanation

Sum of first n natural numbers can be calculated by using this formula:

Sum of squares of n natural numbers can be calculated by using this formula:

We can calculate the values using the above formula and subtract them to get the result.