Python 3 || 4 lines, filter nums1 and count  || T/S:  98% / 61%
\nclass Solution:\n    def numberOfPairs(self, nums1: List[int], \n                            nums2: List[int], k: int, ans = 0) -> int:\n\n        nums1 = lis
```\nclass Solution:\n    def numberOfPairs(self, nums1: List[int], \n                            nums2: List[int], k: int, ans = 0) -> int:\n\n        nums1 = list(map(lambda x: x//k, filter(lambda x: x%k == 0, nums1)))\n        \n        for n1, n2 in product(nums1, nums2):\n            \n            if n1%n2 == 0: ans+= 1\n\n        return ans\n```\n[https://leetcode.com/problems/find-the-number-of-good-pairs-i/submissions/1268155427/](https://leetcode.com/problems/find-the-number-of-good-pairs-i/submissions/1268155427/)\n\nI could be wrong, but I think that time complexity is *O*(*MN*) and space complexity is *O*(1), in which *M* ~ `len(nums1)` and *N* ~ `len(nums2)`.
['Python3']