• + 0 comments
    def divisibleSumPairs(n, k, ar):
        return sum(((ar[i]+ar[j])%k==0 for j in range(n) for i in range(j)))