You are viewing a single comment's thread. Return to all comments →
i think this code will take less runtime than yours :)
def divisibleSumPairs(n, k, ar): # Complete this function return sum(1 for i in range(n) for j in range(i+1 ,n) if (ar[i]+ar[j])%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 →
i think this code will take less runtime than yours :)