human
Find GCD of factorial of elements of given array | Implementation of factorial function.
Function to find GCD of factorial of elements from array.
find the minimum element of array.
return the factorial of minimum element.
Driver Code"
How can the above be solved in Python?
 Can you provide a code to find GCD of factorial of elements of given array and the other steps required?
assistant
#Here is code to find GCD of factorial of elements of given array and the other steps required.
 def factorial ( n ) :
	if n == 1 or n == 0 :
		return 1
	else :
		return factorial ( n - 1 ) * n
def gcdOfFactorial ( arr , n ) :
	minm = arr [ 0 ]
	for i in range ( 1 , n ) :
		if minm > arr [ i ] :
			minm = arr [ i ]
		else :
			arr [ i ] = minm
	return factorial ( minm )
arr = [ 9 , 12 , 122 , 34 , 15 ]
n = len ( arr )
print ( gcdOfFactorial ( arr , n ) )