You are given a positive integer N and you have to find the number of non negative integral solutions to a+b+c=N. 
 
Example 1:
Input:
N = 10
Output:
66
Explanation:
There are 66 possible solutions.
Example 2:
Input:
N = 20
Output:
231
Explanation:
There are 231 possible solutions.
 
Your Task:
You don't need to read input or print anything. Your task is to complete the function noOfIntSols() which takes an Integer N as input and returns the number of integer solutions possible.
 
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
 
Constraints:
1 <= N <= 10^{9}

Source: geeksforgeeks | Difficulty: EASY
Tags: Mathematics

Starter code: #User function Template for python3



class Solution:

    def noOfIntSols(self, N):

        # code here

Solutions:
class Solution:

	def noOfIntSols(self, N):
		return N * (N + 1) // 2 + (N + 1)


import math

class Solution:

	def noOfIntSols(self, N):
		r = (N + 2) * (N + 1) // 2
		return r


class Solution:

	def noOfIntSols(self, N):
		return (N + 2) * (N + 1) // 2
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		N = int(input())
		ob = Solution()
		print(ob.noOfIntSols(N))


class Solution:

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


class Solution:

	def noOfIntSols(self, N):
		if N % 2 == 0:
			return (N + 1) * (N // 2 + 1)
		else:
			return (N + 2) * (N // 2 + 1)


import math

class Solution:

	def noOfIntSols(self, N):
		m = 3
		return (N + 2) * (N + 1) // 2


class Solution:

	def noOfIntSols(self, N):
		return int(abs((N + 1) * (N + 2) // 2))