LearnPy Hub
← Arena
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
solution.py
Output appears here
Pairs Divisible by k · Python Arena problem · LearnPy Hub