#P10263. [GESP202403 八级] 公倍数问题
[GESP202403 八级] 公倍数问题
Background
Related multiple-choice and true/false questions: https://ti.luogu.com.cn/problemset/1148.
Problem Description
Xiao A wrote an matrix . We cannot see this matrix, but we know that the element in row and column is a common multiple of and (, ). Now there are children. The -th child wants to know: in matrix , what is the maximum number of elements that can be equal to (). Please help them compute the answers.
Note: the answers for different children are independent. For example, if some positions can be and also can be , then those positions can satisfy both children and $y at the same time.
For convenience, you only need to output , where denotes the answer that the -th child is interested in.
Input Format
The first line contains three positive integers .
Output Format
Output one line: .
Please note that this number may be very large. If you are using C++, consider using data types such as long long to store the answer.
2 5 2
9
100 100 100
185233
Hint
Sample 1 Explanation
Only can be ; all the others cannot.
can all be , and the others cannot.
So the answer is .
Constraints
For of the testdata, .
For of the testdata, .
For of the testdata, , and .
Translated by ChatGPT 5