Simple Python with Math
class Solution(object):\n    def findPoisonedDuration(self, timeSeries, duration):\n        """\n        :type timeSeries: List[int]\n        :type duration: in
class Solution(object):\n    def findPoisonedDuration(self, timeSeries, duration):\n        """\n        :type timeSeries: List[int]\n        :type duration: int\n        :rtype: int\n        """\n        total = 0 \n        timeSeries = [i+duration-1 for i in timeSeries]\n        last = 0\n        for i in timeSeries :\n            if (i-duration+1)<=last and last != 0:\n                total += i-last \n            else:\n                total += duration\n            last = i\n        return total
[]