Python 3 (80ms) | Easy Brute Force N^2 Approach
\nclass Solution:\n    def countPairs(self, nums: List[int], k: int) -> int:\n        n=len(nums)\n        c=0\n        for i in range(0,n):\n            for j 
```\nclass Solution:\n    def countPairs(self, nums: List[int], k: int) -> int:\n        n=len(nums)\n        c=0\n        for i in range(0,n):\n            for j in range(i+1,n):\n                if nums[i]==nums[j] and ((i*j)%k==0):\n                    c+=1\n        return c\n```
['Python', 'Python3']