Easy10 pts
Divisible Sum Pairs
n integers, k. Count pairs (i,j) with i<j and (ar[i]+ar[j])%k===0.
Input
n k\nar
Output
Count.
Sample
6 3 1 3 2 6 1 2
Expected
5
Loading editor…
Output
No output yet. Run your code to see results.
n integers, k. Count pairs (i,j) with i<j and (ar[i]+ar[j])%k===0.
n k\nar
Count.
6 3 1 3 2 6 1 2
5
Loading editor…
No output yet. Run your code to see results.