Can not understand the problem


#1

I can not figure out how the answer is obtained with some tricky test cases, for example:
A = [1,1,1,1,1]
B = 2
Expected output: 4
How is this going to be 4?
I thought you could take any pair with the constraint i != j, if it was the case we can create 10 pairs. Also, I thought the pairs had to be distinct, but if that was the case the answer would be 1.
So that the problem statement is not clear and I am unable to understand the problem.


#2

It is said that Array is pf distinct elements