#P9489. ZHY 的表示法
ZHY 的表示法
Problem Description
ZHY calls a positive integer representable if and only if there exists a real number such that $\lfloor \frac y {x_1} \rfloor+\lfloor \frac y {x_2} \rfloor+\cdots + \lfloor \frac y {x_n} \rfloor=x$. Now, ZHY wants to know how many positive integers in the interval are representable.
Input Format
The first line contains three positive integers .
The second line contains positive integers .
Output Format
Output one integer in a single line, representing the answer.
2 5 10
2 3
5
Hint
Sample Explanation
When , choose and the condition holds.
When , choose and the condition holds.
When , choose and the condition holds.
When , choose and the condition holds.
When , choose and the condition holds.
Therefore, are representable. It can be proven that for any real number , $\lfloor \frac y {2} \rfloor+\lfloor \frac y {3} \rfloor\ne 9$. Therefore, the answer is .
Constraints
For of the testdata, .
For another of the testdata, .
For of the testdata, , , .
Translated by ChatGPT 5