Easy to understand || O(n2) || Simple python
\ndef countPairs(self, nums: List[int], k: int) -> int:\n        count = 0\n        \n        for i in range(len(nums)):\n            for j in range(i+1,len(num
```\ndef countPairs(self, nums: List[int], k: int) -> int:\n        count = 0\n        \n        for i in range(len(nums)):\n            for j in range(i+1,len(nums)):\n                if nums[i]==nums[j] and (i*j)%k==0:\n                    count+=1\n        return count\n```
['Python3']