MCPcopy Create free account
hub / github.com/Hsinha11/Leetcode-solutions / Solution

Class Solution

495-teemo-attacking/teemo-attacking.py:1–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Solution:
2 def findPoisonedDuration(self, time: List[int], duration: int) -> int:
3 ans=0
4 for i in range(1,len(time)):
5 if (time[i]-time[i-1])<duration:
6 ans+=time[i]-time[i-1]
7 else:
8 ans+=duration
9 ans+=duration
10 return ans

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected