human
Determine winner of the Game by arranging balls in a row | Function to find the winner of the Game by arranging the balls in a row.
Check if small balls are greater or equal to the large ones.
X can place balls therefore scores n - 1.
Condition if large balls are greater than small.
X can have m - 1 as a score since greater number of balls can only be adjacent.
Compare the score.
Driver Code.
Given number of small balls ( N ) and number of large balls ( M ).
Function call"
How can the above be solved in Python?
 What is a code to determine winner of the Game by arranging balls in a row and the other steps required?
assistant
#Here is code to determine winner of the Game by arranging balls in a row and the other steps required.
 def findWinner ( n , m ) :
	X = 0 ;
	Y = 0 ;
	if ( n >= m ) :
		X = n - 1 ;
		Y = m ;
	else :
		X = m - 1 ;
		Y = n ;
	if ( X > Y ) :
		print ( " X " ) ;
	elif ( Y > X ) :
		print ( " Y " ) ;
	else :
		print ( " - 1" ) ;
if __name__ == ' _ _ main _ _ ' :
	n = 3 ;
	m = 1 ;
	findWinner ( n , m ) ;