You are viewing a single comment's thread. Return to all 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
Seems like cookies are disabled on this browser, please enable them to open this website
Divisible Sum Pairs
You are viewing a single comment's thread. Return to all comments →