python3 code
Code\n\nclass Solution:\n    def distinctDifferenceArray(self, nums: List[int]) -> List[int]:\n        res = []\n        for i in range(len(nums)):\n           
# Code\n```\nclass Solution:\n    def distinctDifferenceArray(self, nums: List[int]) -> List[int]:\n        res = []\n        for i in range(len(nums)):\n            res.append(len(set(nums[:i+1])) - len(set(nums[i + 1:])))\n        return res\n```
['Python3']