human
Minimum increments to modify array such that value of any array element can be splitted to make all remaining elements equal | Function to count minimum moves.
Stores sum of given array.
Stores maximum array element.
Base Case.
If N is 2 , the answer will always be 0.
Traverse the array.
Calculate sum of the array.
Finding maximum element.
Calculate ceil ( sum / N - 1 ).
If k is smaller than maxelement.
Final sum - original sum.
Print the minimum number of increments required.
Driver Code.
Given array.
Size of given array.
Function Call"
How can the above be solved in Python?

What is a code to minimum increments to modify array such that value of any array element can be splitted to make all remaining elements equal and the other steps required?
assistant
#Here is code to minimum increments to modify array such that value of any array element can be splitted to make all remaining elements equal and the other steps required.
 def minimumMoves ( arr , N ) :
	sum = 0
	maxelement = - 1
	if ( N == 2 ) :
		print ( 0 , end = " " )
	for i in range ( N ) :
		sum += arr [ i ]
		maxelement = max ( maxelement , arr [ i ] )
	K = ( sum + N - 2 ) // ( N - 1 )
	K = max ( maxelement , K )
	ans = K * ( N - 1 ) - sum
	print ( ans )
if __name__ == ' _ _ main _ _ ' :
	arr = [ 2 , 3 , 7 ]
	N = 3
	minimumMoves ( arr , N )