题目:
题解:
cpp
int findPoisonedDuration(int* timeSeries, int timeSeriesSize, int duration){
int count = 0;
for(int i=1; i<timeSeriesSize; i++){
if(timeSeries[i] - timeSeries[i-1] < duration)
count += (timeSeries[i] - timeSeries[i-1]);
else
count += duration;
}
count += duration;
return count;
}