comefrom: <doocs>2327.Number of People Aware of a Secret_1.py
code: def peopleAwareOfSecret( n: int, delay: int, forget: int) -> int:
      m = (n << 1) + 10
      d = [0] * m
      cnt = [0] * m
      cnt[1] = 1
      for i in range(1, n + 1):
          if cnt[i]:
              d[i] += cnt[i]
              d[i + forget] -= cnt[i]
              nxt = i + delay
              while nxt < i + forget:
                  cnt[nxt] += cnt[i]
                  nxt += 1
      mod = 10**9 + 7
      return sum(d[: n + 1]) % mod
masked: def sample_funcname ( var_0 : int , var_2 : int , var_3 : int ) -> int :
      var_6 = ( var_0 << 1 ) + 10
      var_8 = [ 0 ] * var_6
      var_9 = [ 0 ] * var_6
      var_9 [ 1 ] = 1
      for var_11 in range ( 1 , var_0 + 1 ) :
          if var_9 [ var_11 ] :
              var_8 [ var_11 ] += var_9 [ var_11 ]
              var_8 [ var_11 + var_3 ] -= var_9 [ var_11 ]
              var_12 = var_11 + var_2
              while var_12 < var_11 + var_3 :
                  var_9 [ var_12 ] += var_9 [ var_11 ]
                  var_12 += 1
      var_15 = 10 ** 9 + 7
      return sum ( var_8 [ : var_0 + 1 ] ) % var_15
  