human
Make array elements equal in Minimum Steps | Returns the minimum steps required to make an array of N elements equal , where the first array element equals M.
Corner Case 1 : When N = 1.
Corner Case 2 : When N = 2.
Driver Code"
How can the above be solved in Python?
 Write me a code to make array elements equal in Minimum Steps and the other steps required?
assistant
#Here is code to make array elements equal in Minimum Steps and the other steps required.
 def steps ( N , M ) :
	if ( N == 1 ) :
		return 0
	elif ( N == 2 ) :
		return M
	return 2 * M + ( N - 3 )
N = 4
M = 4
print ( steps ( N , M ) )