<qiyuangong>1365_How_Many_Numbers_Are_Smaller_Than_the_Current_Number_2.py
def smallerNumbersThanCurrent( nums: List[int]) -> List[int]:
    count_list = [0] * 101
    for v in nums:
        count_list[v] += 1
    for i in range(1, 101):
        count_list[i] += count_list[i-1]
    res = []
    for v in nums:
        if v == 0:
            res.append(0)
        else:
            res.append(count_list[v-1])
    return res
def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
    var_5 = [ 0 ] * 101
    for var_6 in var_0 :
        var_5 [ var_6 ] += 1
    for var_9 in range ( 1 , 101 ) :
        var_5 [ var_9 ] += var_5 [ var_9 - 1 ]
    var_10 = [ ]
    for var_6 in var_0 :
        if var_6 == 0 :
            var_10.append ( 0 )
        else :
            var_10.append ( var_5 [ var_6 - 1 ] )
    return var_10
