human
Find the number of rectangles of size 2 * 1 which can be placed inside a rectangle of size n * m | function to Find the number of rectangles of size 2 * 1 can be placed inside a rectangle of size n * m.
if n is even.
if m is even.
if both are odd.
Driver code.
function call"
How can the above be solved in Python?
 ... Can you provide a code to find the number of rectangles of size 2 * 1 which can be placed inside a rectangle of size n * m and the other steps required?
assistant
#Here is code to find the number of rectangles of size 2 * 1 which can be placed inside a rectangle of size n * m and the other steps required.
 def NumberOfRectangles ( n , m ) :
	if ( n % 2 == 0 ) :
		return ( n / 2 ) * m
	elif ( m % 2 == 0 ) :
		return ( m // 2 ) * n
	return ( n * m - 1 ) // 2
if __name__ == " _ _ main _ _ " :
	n = 3
	m = 3
	print ( NumberOfRectangles ( n , m ) )