1
# Runtime: 676 ms (Top 17.97%) | Memory: 19.4 MB (Top 70.89%)3
# Here we use list to store ping details.7
def ping(self, t: int) -> int:8
# Basically what we need to return is how many pings fall in the range(t-3000, t).9
# So here we append every t. Now in loop how many t from left side < t-3000, we just pop them10
# and return the length of the list, which'd contain elements in range(t-3000, t).11
# And since every t is going to greater than previous, we don't need to think about duplicates.15
while self.store[0] < t - 3000:18
return len(self.store)