Easy Solution | Python | 5-liner
\nclass Solution:\n    def countPairs(self, nums: List[int], k: int) -> int:\n        count = 0\n        for i in range(len(nums)):\n            for j in range(
```\nclass Solution:\n    def countPairs(self, nums: List[int], k: int) -> int:\n        count = 0\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: count+=1\n        return count\n```\n\nDo upvote and comment..!
[]