<doocs>1887.Reduction Operations to Make the Array Elements Equal_1.py
def reductionOperations( nums: List[int]) -> int:
    nums.sort()
    ans = cnt = 0
    for i, v in enumerate(nums[1:]):
        if v != nums[i]:
            cnt += 1
        ans += cnt
    return ans
def sample_funcname ( var_0 : List [ int ] ) -> int :
    var_0.sort ( )
    var_6 = var_4 = 0
    for var_8 , var_10 in enumerate ( var_0 [ 1 : ] ) :
        if var_10 != var_0 [ var_8 ] :
            var_4 += 1
        var_6 += var_4
    return var_6
