human
What is a code to count tiles of dimensions 2 * 1 that can be placed in an M * N rectangular board that satisfies the given conditions and the other steps required given the following:
Count tiles of dimensions 2 * 1 that can be placed in an M * N rectangular board that satisfies the given conditions | Function to count tiles of dimensions 2 x 1 that can be placed in a grid of dimensions M * N as per given conditions.
Number of tiles required.
Driver Code"
Solution in Python:
assistant
#Here is code to count tiles of dimensions 2 * 1 that can be placed in an M * N rectangular board that satisfies the given conditions and the other steps required.
 def numberOfTiles ( N , M ) :
	if ( N % 2 == 1 ) :
		return - 1
	return ( N * M ) // 2
N = 2
M = 4
print ( numberOfTiles ( N , M ) )