You are viewing a single comment's thread. Return to all comments →
def divisibleSumPairs(n, k, ar): # Write your code here count = 0 for i in range(0, n) : for j in range(1, n): if i < j and (ar[i] + ar[j]) % k == 0: count+= 1 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 →