Given a set of numbers from 1 to N, each number is exactly present twice so there are N pairs. In the worst-case scenario, how many numbers X should be picked and removed from the set until we find a matching pair?
Example 1:
Input:
N = 1
Output:
2
Explanation:
When N=1 Then there is 
one pair and a matching 
pair can be extracted in 
2 Draws.
Example 2:
Input:
N = 2
Output:
3
Explanation:
When N=2 then there are 
2 pairs, let them be {1,2,1,2}
and a matching pair will 
be made in 3 draws.
Your Task:
You don't need to read input or print anything. Your task is to complete the function find() which takes an integer N as input parameter and returns an integer, the number of x must be picked and removed from set to find a matching pair.
 
Expected Time Complexity: O(1)
Expected Space Complexity: O(1)
 
Constraints:
0 <= N <= 10^{5}

Source: geeksforgeeks | Difficulty: EASY
Tags: Mathematics

Starter code: class Solution:

    def find (self, N):

        # code here

Solutions:
class Solution:

	def find(self, N):
		return N + 1


class Solution:

	def find(self, N):
		if N == 1:
			return N + 1
		else:
			return N + 1


class Solution:

	def find(self, n):
		return n + 1


class Solution:

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


class Solution:

	def find(self, N):
		x = N * 2
		x = x / 2
		x = x + 1
		x = int(x)
		return x


from array import *

class Solution:

	def find(self, N):
		self.N = N
		if self.N == 1:
			return 2
		else:
			return N + 1


class Solution:

	def find(self, N):
		return N + 1
t = int(input())
for i in range(t):
	N = int(input())
	ob = Solution()
	print(ob.find(N))


class Solution:

	def find(self, N):
		return N + 1
N = 4
ans = Solution()
ans.find(N)


class Solution:

	def find(self, N):
		if N % 2 == 0:
			x = N + 1
		else:
			x = N + 1
		return x