Count Equal and Divisible Pairs in an Array Solution in C++
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)$$ -->\nO(n^2)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n# Code\n```\nclass Solution {\npublic:\n    int countPairs(vector<int>& nums, int k) {\n        int i, j, count=0;\n        for(i=0 ; i<nums.size()-1 ; i++)\n        {\n            for(j=i+1 ; j<nums.size() ; j++)\n            {\n                if(nums[i]==nums[j] && (i*j)%k==0)\n                {\n                    count++;\n                }\n            }\n        }\n        return count;\n    }\n};\n```
['C++']