<doocs>2176.Count Equal and Divisible Pairs in an Array_1.py
def countPairs( nums: List[int], k: int) -> int:
    n = len(nums)
    return sum(
        nums[i] == nums[j] and (i * j) % k == 0
        for i in range(n)
        for j in range(i + 1, n)
    )
def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> int :
    var_5 = len ( var_0 )
    return sum ( var_0 [ var_7 ] == var_0 [ var_8 ] and ( var_7 * var_8 ) % var_3 == 0 for var_7 in range ( var_5 ) for var_8 in range ( var_7 + 1 , var_5 ) )
