C++ || GCD
\nlong long countPairs(vector<int>& nums, int k) \n    {\n        long long ans = 0;\n        unordered_map<int, int> mp;\n        \n        for(auto ele:nums)\
```\nlong long countPairs(vector<int>& nums, int k) \n    {\n        long long ans = 0;\n        unordered_map<int, int> mp;\n        \n        for(auto ele:nums)\n        {\n            long long gcd = __gcd(k,ele);\n            long long x=k/gcd;\n            \n            for(auto it:mp)\n                if(it.first%x==0) \n                    ans+=it.second;\n            \n             mp[gcd]++;\n        }\n        \n        return ans;\n    }\n```
['C', 'C++']