Python Elegant & Short | 1-Line | Pairwise
Complexity\n- Time complexity: O(n * m)\n- Space complexity: O(1)\n\n# Code\npython []\nclass Solution:\n    def numberOfPairs(self, first: list[int], second: l
# Complexity\n- Time complexity: $$O(n * m)$$\n- Space complexity: $$O(1)$$\n\n# Code\n```python []\nclass Solution:\n    def numberOfPairs(self, first: list[int], second: list[int], k: int) -> int:\n        return sum(a % (b * k) == 0 for a, b in product(first, second))\n```
['Python3']