human
Minimum numbers to be appended such that mean of Array is equal to 1 | Function to calculate minimum Number of operations.
Storing sum of array arr [ ].
Driver Code.
Function Call"
Solution in Python:
 Write me a code to minimum numbers to be appended such that mean of Array is equal to 1 and the other steps required?
assistant
#Here is code to minimum numbers to be appended such that mean of Array is equal to 1 and the other steps required.
 def minumumOperation ( N , arr ) :
	sum_arr = sum ( arr )
	if sum_arr >= N :
		print ( sum_arr - N )
	else :
		print ( 1 )
N = 4
arr = [ 8 , 4 , 6 , 2 ]
minumumOperation ( N , arr )