#P6539. [COCI 2013/2014 #1] ORGANIZATOR
[COCI 2013/2014 #1] ORGANIZATOR
Background
There is a competition, and you are asked to compute the number of people who advance to the final.
Problem Description
The number of people who advance to the final satisfies the following rules:
You are given integers .
You need to find a positive integer . Suppose there are () values among that are multiples of , then the number of finalists is , whose value is .
Note that for a positive integer , if the corresponding value of is , then this choice is invalid.
Please find an that makes as large as possible, and output .
Input Format
The first line contains a positive integer .
The second line contains integers separated by spaces.
Output Format
Output an integer .
3
1 2 4
4
2
1 5
2
5
4 6 3 8 9
9
Hint
Explanation for Sample 1
Let . Then satisfy the condition, and the answer is .
Constraints
- For of the testdata, .
- For of the testdata, , .
Notes
This problem is translated from COCI2013-2014 CONTEST #1 T5 ORGANIZATOR.
Translated by ChatGPT 5