Java Simple Nive Solution | 26/5/2024
Complexity\n- Time complexity:O(n^2)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity:O(1)\n Add your space complexity here, e.g. O(n) \n\n# Ot
# Complexity\n- Time complexity:$$O(n^2)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:$$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Other Version (SIMILAR QUESTION)\nhttps://leetcode.com/problems/find-the-number-of-good-pairs-ii/solutions/5208996/java-clean-solution-weekly-contest\n\n# Code\n```\nclass Solution {\n    public int numberOfPairs(int[] nums1, int[] nums2, int k) {\n        int count = 0;\n        for (int i = 0; i < nums1.length; i++) {\n            for (int j = 0; j < nums2.length; j++) {\n                if (nums1[i] % (nums2[j] * k) == 0) {\n                    count++;\n                }\n            }\n        }\n        return count;\n    }\n}\n```\n
['Array', 'Math', 'Matrix', 'Java']