Sum of alternating sign Squares of first N natural numbers
Given a number N, the task is to find the sum of alternating sign squares of first N natural numbers, i.e., 12 - 22 + 32 - 42 + 52 - 62 + .... Examples: Input: N = 2 Output: 5 Explanation: Required sum = 12 - 22 = -1 Input: N = 8 Output: 36 Explanation: Required sum = 12 - 22 + 32 - 42 + 52 - 62 + 7