<qiyuangong>338_Counting_Bits_1.py
def countBits( num):
    res = [0] * (num + 1)
    for i in range(1, num + 1):
        res[i] = res[i >> 1] + (i & 1)
    return res
def sample_funcname ( var_0 ) :
    var_3 = [ 0 ] * ( var_0 + 1 )
    for var_5 in range ( 1 , var_0 + 1 ) :
        var_3 [ var_5 ] = var_3 [ var_5 >> 1 ] + ( var_5 & 1 )
    return var_3
