Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 302 Bytes

495.-teemo-attacking.md

File metadata and controls

10 lines (7 loc) · 302 Bytes

495. Teemo Attacking

class Solution:
    def findPoisonedDuration(self, s, d):
        
        ## 在中毒的时候, 再被提莫射了,那么的话就会重新中毒,之前的中毒持续时间马上结算
        return sum(min(d, b - a) for a, b in zip(s, s[1:] + [10e7]))