| SCPC Teens 2025 |
|---|
| Finished |
You are given an array $$$a$$$ of $$$n$$$ integers, you can do this operation at most once:
Print the minimum size of a subset you can choose such that after performing the operation, the GCD (Greatest Common Divisor) of all elements of the array is greater than one. If the GCD is already greater than one without performing the operation, print $$$0$$$.
The first line of the input contains a single integer $$$n \: ( 1 \le n \le 10^6)$$$ — the size of the array $$$a$$$.
The second line contains $$$n$$$ integers $$$a_i (1 \le a_i \le 10^9)$$$ — the elements of the array $$$a$$$.
Print a single integer — the minimum size of the chosen subset or $$$0$$$ if the GCD is already greater than one.
51 2 3 4 5
3
| Name |
|---|


