human
Maximum number which can divide all array element after one replacement | Function to return gcd1 of two numbers.
If one of numbers is 0 then gcd1 is other number.
If both are equal then that value is gcd1.
One is greater.
Function to return minimum sum.
Initialize min_sum with large value.
Initialize variable gcd1.
Storing value of arr [ i ] in c.
Update maxgcd1 if gcd1 is greater than maxgcd1.
returning the maximum divisor of all elements.
Driver code"
Solution in Python:

Can you provide a code to maximum number which can divide all array element after one replacement and the other steps required?
assistant
#Here is code to maximum number which can divide all array element after one replacement and the other steps required.
 def gcd1OfTwoNos ( num1 , num2 ) :
	if ( num1 == 0 ) :
		return num2
	if ( num2 == 0 ) :
		return num1
	if ( num1 == num2 ) :
		return num1
	if ( num1 > num2 ) :
		return gcd1OfTwoNos ( num1 - num2 , num2 )
	return gcd1OfTwoNos ( num1 , num2 - num1 )
def Min_sum ( arr , N ) :
	min_sum = 1000000
	maxgcd1 = 1
	for i in range ( N ) :
		gcd1 = 1
		if ( i == 0 ) :
			gcd1 = arr [ 1 ]
		else :
			gcd1 = arr [ i - 1 ]
		for j in range ( N ) :
			if ( j != i ) :
				gcd1 = gcd1OfTwoNos ( gcd1 , arr [ j ] )
		c = arr [ i ]
		if ( gcd1 > maxgcd1 ) :
			maxgcd1 = gcd1
	return maxgcd1
if __name__ == ' _ _ main _ _ ' :
	arr = [ 16 , 5 , 10 , 25 ]
	N = len ( arr )
	print ( Min_sum ( arr , N ) )