human
Make A , B and C equal by adding total value N to them | Python3 Program to Distribute integer N among A , B , C such that they become equal.
find maximum among the three elements.
summation of three elements.
check if difference is divisible by 3.
Driver code"
Solution in Python:
assistant
#Here is code to make A , B and C equal by adding total value N to them and the other steps required.
 def distributeN ( A , B , C , n ) :
	maximum = max ( A , B , C )
	sum = A + B + C
	p = ( 3 * maximum ) - sum
	diff = n - p
	if diff < 0 or diff % 3 :
		print " No "
	else :
		print " Yes "
A = 10
B = 20
C = 15
n = 14
distributeN ( A , B , C , n )