human
Smallest positive integer that does not divide any elements of the given array | Function to find the smallest number which doesn 't divides any integer in the given array arr[].
Traverse the array arr [ ].
Maximum array element.
Initialize variable.
Traverse from 2 to max.
Stores if any such integer is found or not.
If any array element is divisible by j.
Smallest integer.
Prthe answer.
Driver Code.
Function Call"
Solution in Python:
assistant
#Here is code to smallest positive integer that does not divide any elements of the given array and the other steps required.
 def smallestNumber ( arr , lenn ) :
	maxi = 0
	for i in range ( lenn ) :
		maxi = max ( maxi , arr [ i ] )
	ans = - 1
	for i in range ( 2 , maxi + 2 ) :
		flag = True
		for j in range ( lenn ) :
			if ( arr [ j ] % i == 0 ) :
				flag = False
				break
		if ( flag ) :
			ans = i
			break
	print ( ans )
if __name__ == ' _ _ main _ _ ' :
	arr = [ 3 , 2 , 6 , 9 , 2 ]
	N = len ( arr )
	smallestNumber ( arr , N )