Among the given
N
natural numbers, determine how many pairs of identical numbers are among them.
Input
The first line contains a natural number
N
- the number of numbers. In the second line -
N
natural numbers (
\(2<=N<=100\), all numbers do not exceed 100 ).
Imprint
Print one number - number of pairs of identical numbers.
Examples
# |
Input |
Output |
Note |
1 |
5
1 3 2 2 3
|
2 |
|
2 |
4
1 1 1 1
|
6 |
Any two numbers form a pair of identical numbers
sequences, so the answer is the number of pairs that are in total
can be (these are pairs of numbers standing in place: (1,2), (1,3), (1,4),
(2,3), (2,4), (3,4)).
|