human
Count common elements in two arrays containing multiples of N and M | Recursive function to find gcd using euclidean algorithm.
Function to find lcm of two numbers using gcd.
Driver code"
Solution in Python:

Write me a code to count common elements in two arrays containing multiples of N and M and the other steps required?
assistant
#Here is code to count common elements in two arrays containing multiples of N and M and the other steps required.
 def gcd ( a , b ) :
	if ( a == 0 ) :
		return b ;
	return gcd ( b % a , a ) ;
def lcm ( n , m ) :
	return ( n * m ) // gcd ( n , m ) ;
if __name__ == " _ _ main _ _ " :
	n = 2 ; m = 3 ; k = 5 ;
	print ( k // lcm ( n , m ) ) ;