Given an integer n, denoting the number of cuts that can be made on a pancake, find the maximum number of pieces that can be formed by making n cuts.
NOTE: Cuts can't be horizontal.
 
Example 1:
Input: N = 5
Output: 16
Explanation:  16 pieces can be formed by
making 5 cuts.
Example 2:
Input: N = 3
Output: 7
Explanation: 7 pieces can be formed by 
making 3 cuts.
 
Your Task: 
You don't need to read or print anything. Your task is to complete the function maximum_Cuts() which takes n as input parameter and returns the maximum number of pieces that can be formed by making n cuts.
 
Expected Time Complexity: O(1)
Expected Space Complexity: O(1)
Constraints:
1 <= N <= 10000

Source: geeksforgeeks | Difficulty: EASY
Tags: Mathematics

Starter code: #User function Template for python3

class Solution:
	def maximum_Cuts(self, n):
		# Code here

Solutions:
class Solution:

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


class Solution:

	def maximum_Cuts(self, n):
		if n % 2:
			return int((n + 1) / 2) * n + 1
		else:
			return int((n + 1) / 2) * (n + 1) + 1


class Solution:

	def maximum_Cuts(self, n):
		p = n * (n + 1) / 2 + 1
		return int(p)


class Solution:

	def maximum_Cuts(self, n):
		lst = []
		lst.append(2)
		lst.append(4)
		d = 2
		for i in range(1, n):
			c = d + i + lst[i]
			lst.append(c)
		return lst[n - 1]


class Solution:

	def maximum_Cuts(self, n):
		if n <= 2:
			if n == 0:
				return 1
			return 2 * n
		else:
			a = 1 + n * (n + 1) // 2
			return a


class Solution:

	def maximum_Cuts(self, n):
		prev = 2
		for i in range(2, n + 1):
			prev += i
		return prev


class Solution:

	def maximum_Cuts(self, n):
		sum = 2
		j = 2
		for i in range(1, n):
			sum += j
			j += 1
		return sum


class Solution:

	def maximum_Cuts(self, n):
		result = int(1 + n * (n + 1) / 2)
		return result


class Solution:

	def maximum_Cuts(self, n):
		return 1 + n * (n + 1) // 2
if __name__ == '__main__':
	T = int(input())
	for i in range(T):
		n = int(input())
		ob = Solution()
		ans = ob.maximum_Cuts(n)
		print(ans)


class Solution:

	def maximum_Cuts(self, n):
		c = 1
		for i in range(1, n + 1):
			c += i
		return c


class Solution:

	def maximum_Cuts(self, n):
		cut = 1
		cuts = n * (n + 1) // 2 + 1
		return cuts