. - 力扣(LeetCode)

直接根据题意写就行了

from typing import List
 
 
class Solution:
	def numberOfPairs(self, nums1: List[int], nums2: List[int], k: int) -> int:
		ans = 0
		for ni in nums1:
			for nj in nums2:
				if ni % (nj * k) == 0:
					ans += 1
		return ans