comefrom: <doocs>0338.Counting Bits_1.py
code: def countBits( n: int) -> List[int]:
      ans = [0] * (n + 1)
      for i in range(1, n + 1):
          ans[i] = ans[i & (i - 1)] + 1
      return ans
masked: def sample_funcname ( var_0 : int ) -> List [ int ] :
      var_5 = [ 0 ] * ( var_0 + 1 )
      for var_7 in range ( 1 , var_0 + 1 ) :
          var_5 [ var_7 ] = var_5 [ var_7 & ( var_7 - 1 ) ] + 1
      return var_5
  