EasyRating 1000
Pairs Divisible by k
Count the pairs i < j where aᵢ + aⱼ is divisible by k.
Input
n and k, then n integers.
Output
One integer.
Sample 1
Input
6 3 1 3 2 6 1 2
Output
5
Sample 2
Input
1 5 5
Output
0
Output appears heren and k, then n integers.
One integer.
6 3 1 3 2 6 1 2
5
1 5 5
0
Output appears here