PYTHON | SIMPLEST HASHMAP SOLUTION
```class Solution:\n    def countDistinct(self, nums: List[int], k: int, p: int) -> int:\n        s = set()\n        for i in range(len(nums)):\n            cou
```class Solution:\n    def countDistinct(self, nums: List[int], k: int, p: int) -> int:\n        s = set()\n        for i in range(len(nums)):\n            count = 0\n            curr = ""\n            for j in range(i,len(nums)):\n                if nums[j]%p == 0:\n                    count += 1\n                if count > k:\n                    break\n                curr += str(nums[j])+"-"\n                s.add(curr)\n        return len(s)\n                \n
['Python']