<doocs>1365.How Many Numbers Are Smaller Than the Current Number_1.py
def smallerNumbersThanCurrent( nums: List[int]) -> List[int]:
    cnt = [0] * 101
    for num in nums:
        cnt[num] += 1
    for i in range(1, 101):
        cnt[i] += cnt[i - 1]
    res = []
    for num in nums:
        res.append(0 if num == 0 else cnt[num - 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 :
        var_10.append ( 0 if var_6 == 0 else var_5 [ var_6 - 1 ] )
    return var_10
