C++ || MAX LIMIT EASY BEATS 100%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int numberOfPairs(vector<int>& nums1, vector<int>& nums2, int k) {\n        map<int,long long> a, b; \n        for (int num : nums2) {\n            b[num]++; \n        } \n        int mx=0;\n        for (int num : nums1) {\n            if(num%k!=0){ continue;}\n            a[num]++;\n            mx=max(mx,num);\n        }\n        vector<long long> kp;\n        \n        long long gp = 0;\n\n        for(auto it:b){\n            long long h=k*it.first;\n            long long jp=0; \n            int op=1;\n            while(op*h<=mx){\n                jp+=a[op*h];\n                op++;\n            }\n            gp+=jp*it.second;\n        }\n\n        return gp;\n    }\n};\n```
['C++']