Question
200-Multiple Pairs
Jake received a gift with the number 200 written on it, sparking his curiosity. He has an array, B, of size N and wants to find pairs of positions (i, j) (where 1 ≤ i < j ≤ N) such that the difference between the values at these positions (B[i] - B[j]) is a multiple of 200. Can you help Jake find these pairs?
Input
The first line of the input contains a single integer, N.
The second line of the input contains N space-separated integers B1, B2 ... BN.
Constraints
All values in the input are integers.
2 ≤ N ≤ 2×105
1 ≤ Bi ≤ 109
The second line of the input contains N space-separated integers B1, B2 ... BN.
Constraints
All values in the input are integers.
2 ≤ N ≤ 2×105
1 ≤ Bi ≤ 109
Output
Print the answer as an integer.
Example
Sample Input
6
123 223 123 523 200 2000
Sample Output
4
Explanation
For example, for (i, j)=(1, 3), B1 − B3 = 0 is a multiple of 200.
We have four pairs satisfying the conditions: (i, j) = (1, 3), (1, 4), (3, 4), (5, 6).
6
123 223 123 523 200 2000
Sample Output
4
Explanation
For example, for (i, j)=(1, 3), B1 − B3 = 0 is a multiple of 200.
We have four pairs satisfying the conditions: (i, j) = (1, 3), (1, 4), (3, 4), (5, 6).