You are viewing a single comment's thread. Return to all comments →
Use combinations...
def divisibleSumPairs(n, k, ar): # Complete this function return len([x for x in combinations(range(n), 2) if (ar[x[0]]+ar[x[1]])%k==0])
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 →
Use combinations...