human
Count all distinct pairs with product equal to K | Function to count the number of pairs whose product is equal to K.
Pick all elements one by one.
Check if the product of this pair is equal to K.
Driver code"
Solution in Python:

=====
Write me a code to count all distinct pairs with product equal to K and the other steps required?
assistant
#Here is code to count all distinct pairs with product equal to K and the other steps required.
 def countPairsWithProdK ( arr , n , k ) :
	count = 0
	for i in range ( n ) :
		for j in range ( i + 1 , n ) :
			if ( arr [ i ] * arr [ j ] == k ) :
				count += 1
	return count
arr = [ 1 , 5 , 3 , 4 , 2 ]
N = len ( arr )
K = 3
print ( countPairsWithProdK ( arr , N , K ) )