can someone help me to complete this code
\nclass Solution {\npublic:\n    long long coutPairs(vector<int>& nums, int k) {\n        \n        long long ans=0;\n        long long even=0,odd=0, k_multiple
```\nclass Solution {\npublic:\n    long long coutPairs(vector<int>& nums, int k) {\n        \n        long long ans=0;\n        long long even=0,odd=0, k_multiple=0;\n        for(int i=0; i<nums.size(); i++){\n            if(nums[i]%2==0){\n                even++;\n            }else{\n                odd++;\n            }\n            \n            if(nums[i]%k==0){\n                k_multiple++;\n            }\n        }\n        \n        if(k%2==0){\n            ans=even*odd+even/2;\n        }else{\n            if(k_multiple != 0){\n                ans=(nums.size()-k_multiple)*odd + odd/2;\n            }\n            \n        }\n        \n        return ans;\n    }\n};\n```
['C++']