#510. 最大公约数和最小公倍数问题
最大公约数和最小公倍数问题
Explanation
Input two positive integers x0 and y0 (2<=x0<100000, 2<=y0<=1000000), and find the number of P and Q that satisfy the following conditions.
Condition:
1. P and Q are positive integers;
2. Require P and Q to have x0 as the greatest common divisor and y0 as the least common multiple.
Try asking:
The number of all possible positive integers that satisfy the condition.
Input format
Each test file contains only one set of test data, each set consisting of two positive integers x0 and y0(2<=x0<100000, 2<=y0<=1000000).
Output format
For each set of input data, output the number of possible two positive integers that satisfy the condition.
The following is an explanation of the sample data:
Enter 3 60
At this time, the P Q are:
3 60
15 12
12 15
60 3
So, there are a total of four possible numbers of two positive integers that satisfy the condition.
Example
3 60
4