Score : $600$ points
There are $N$ integers $A_1, A_2, A_3, \dots, A_N$ written on a blackboard.
You will do the following operation $N - 1$ times:
After $N - 1$ operations, just one integer will remain on the blackboard. How many possible values of this number are there?
Input is given from Standard Input in the following format:
$N$ $A_1$ $A_2$ $A_3$ $\dots$ $A_N$
Print the number of possible values of the last remaining number on the blackboard.
3 6 9 12
2
The possible values of the last remaining number are $3$ and $6$.
We will have $3$ in the end if, for example, we do as follows:
Also, we will have $6$ in the end if, for example, we do as follows:
4 8 2 12 6
1
$2$ is the only number that can remain on the blackboard.
7 30 28 33 49 27 37 48
7
$1$, $2$, $3$, $4$, $6$, $7$, and $27$ can remain on the blackboard.