Simple and very easy to understand solution
Intuition\ncheck for every nnumber in nums1 how many nums2[i] divide it.\n\n# Approach\nsimple brute force\n\n# Complexity\n- Time complexity:\n O(n^2) \n\n- Sp
# Intuition\ncheck for every nnumber in nums1 how many nums2[i] divide it.\n\n# Approach\nsimple brute force\n\n# Complexity\n- Time complexity:\n $$O(n^2)$$ \n\n- Space complexity:\n$$O(1)$$ \n\n# Code\n```\nclass Solution {\npublic:\n    int numberOfPairs(vector<int>& nums1, vector<int>& nums2, int k) {\n        int n=nums1.size();\n        int m=nums2.size();\n        int c=0;\n        for(int i=0;i<m;i++)nums2[i]*=k;\n         for(int i=0;i<n;i++)\n         {\n              for(int j=0;j<m;j++)\n              {\n                  if(nums1[i]%nums2[j]==0)c++;\n              }\n         }\n        return c;\n    }\n};\n```
['C++']