• + 0 comments
    def divisibleSumPairs(n, k, ar):
        lst =[]
        count = 0
        for j in ar:
            count += lst.count(j%k)
            if k - (j%k) <= k:
                lst.append(k - (j%k))
            if k - (j%k) == k:
                lst.append(0)
        return count