You are viewing a single comment's thread. Return to all comments →
c
int divisibleSumPairs(int n, int k, int ar_count, int* ar) { int counter = 0; for (int i = 0; i < ar_count; i++) { for (int j = 0; j < i; j++) { if (((ar[i] + ar[j]) % k) == 0) { counter++; } } } return counter; }
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 →
c