Given a single integer N, your task is to find the sum of the square of the first N even natural Numbers.
 
Example 1:
Input: 2
Output: 20
Explanation: 2^{2 + }4^{2 }= 20
Example 2: 
Input: 3
Outptut: 56
Explanation: 2^{2} + 4^{2} + 6^{2} = 56
 
Your Task:
You don't need to read or print anything. Your task is to complete the function sum_of_square_evenNumbers() which takes N as the input parameter and returns the sum of the first N even natural numbers.
 
Expected Time Complexity: O(1)
Expected Space Complexity: O(1)
 
Constraints:
1 <= N <= 10000

Source: geeksforgeeks | Difficulty: EASY
Tags: Mathematics

Starter code: class Solution:

	def sum_of_square_evenNumbers(self, n):

		# Code here

Solutions:
class Solution:

	def sum_of_square_evenNumbers(self, n):
		return 2 * n * (n + 1) * (2 * n + 1) // 3


class Solution:

	def sum_of_square_evenNumbers(self, n):
		_sum = int(2 * n * (n + 1) * (2 * n + 1) / 3)
		return _sum


class Solution:

	def sum_of_square_evenNumbers(self, n):
		c = 2
		square = 0
		for i in range(n):
			square += c * c
			c += 2
		return square


class Solution:

	def sum_of_square_evenNumbers(self, n):
		even = 2
		root = 0
		for i in range(n):
			root += even * even
			even += 2
		return root


class Solution:

	def sum_of_square_evenNumbers(self, n):
		return int(4 * (n * (n + 1) * (2 * n + 1)) / 6)


class Solution:

	def sum_of_square_evenNumbers(self, n):
		s = 0
		a = 2
		for i in range(1, n + 1):
			s += a * a
			a += 2
		return s


class Solution:

	def sum_of_square_evenNumbers(self, N):
		sum = 2 * N * (N + 1) * (2 * N + 1) // 3
		return sum


class Solution:

	def sum_of_square_evenNumbers(self, n):
		H = int(2 * n * (n + 1) * (2 * n + 1) / 3)
		return H


class Solution:

	def sum_of_square_evenNumbers(self, n):
		s = n * (n + 1) * (2 * n + 1) // 6
		return s * 4


class Solution:

	def sum_of_square_evenNumbers(self, n):
		num = 2
		summ = 0
		for i in range(1, n + 1):
			summ += num * num
			num += 2
		return summ


class Solution:

	def sum_of_square_evenNumbers(self, n):
		x = 2
		count = 0
		for i in range(1, n + 1):
			count += x * x
			x += 2
		return count


class Solution:

	def sum_of_square_evenNumbers(self, n):
		sum = 0
		i = 2
		for u in range(1, n + 1):
			sum += i * i
			i += 2
		return sum


class Solution:

	def sum_of_square_evenNumbers(self, n):
		total = 0
		for i in range(2, 2 * n + 2, 2):
			total += i * i
		return total


import math

class Solution:

	def sum_of_square_evenNumbers(self, n):
		return 2 * n * (n + 1) * (2 * n + 1) // 3


class Solution:

	def sum_of_square_evenNumbers(self, n):
		sum = 2 * n * (n + 1) * (2 * n + 1) / 3
		return int(sum)


class Solution:

	def sum_of_square_evenNumbers(self, n):
		N = n
		s = 2 * N * (N + 1) * (2 * N + 1) // 3
		return s


import math

class Solution:

	def sum_of_square_evenNumbers(self, n):
		sum = 0
		i = 2
		while n != 0:
			sum += i * i
			i += 2
			n -= 1
		return sum


class Solution:

	def sum_of_square_evenNumbers(self, n):
		a = n * (n + 1) * (2 * n + 1) * 4
		b = a / 6
		c = int(b)
		return c


class Solution:

	def sum_of_square_evenNumbers(self, n):
		x = n * (n + 1) * (2 * n + 1) // 6
		return x * 4


class Solution:

	def sum_of_square_evenNumbers(self, n=2):
		fact = 0
		for i in range(1, n + 1):
			fact += 2 * i * 2 * i
		return fact


class Solution:

	def sum_of_square_evenNumbers(self, n):
		out = 2 * n * (n + 1) * (2 * n + 1) / 3
		return int(out)


class Solution:

	def sum_of_square_evenNumbers(self, n):
		n += 1
		l = []
		for i in range(2, n * 2, 2):
			l.append(i * i)
		return sum(l)


class Solution:

	def sum_of_square_evenNumbers(self, n):
		num = 2
		sum = 0
		for i in range(n):
			sum += num * num
			num += 2
		return sum


class Solution:

	def sum_of_square_evenNumbers(self, n):
		sumi = 0
		diff = 2
		while n > 0:
			sumi += diff * diff
			diff += 2
			n -= 1
		return sumi


class Solution:

	def sum_of_square_evenNumbers(self, n):
		s = 0
		for i in range(1, n + 1):
			s += i * i
		s *= 4
		return s


class Solution:

	def sum_of_square_evenNumbers(self, n):
		ans = 0
		ans = n * (n + 1) * (2 * n + 1) * 2 / 3
		return int(ans)