#P1029. [NOIP 2001 普及组] 最大公约数和最小公倍数问题
[NOIP 2001 普及组] 最大公约数和最小公倍数问题
Description
Given two positive integers , find the number of pairs that satisfy the following conditions:
- are positive integers.
- have greatest common divisor and least common multiple .
Compute the number of all possible pairs that satisfy the conditions.
Input Format
One line with two positive integers .
Output Format
One line with a single number, representing the number of pairs that satisfy the conditions.
3 60
4
Hint
There are 4 possibilities for :
- .
- .
- .
- .
Constraints: For of the testdata, .
Source: NOIP 2001 Junior, Problem 2.
Translated by ChatGPT 5
京公网安备 11011102002149号