luogu#P1029. [NOIP 2001 普及组] 最大公约数和最小公倍数问题
[NOIP 2001 普及组] 最大公约数和最小公倍数问题
题目描述
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.
输入格式
One line with two positive integers .
输出格式
One line with a single number, representing the number of pairs that satisfy the conditions.
样例 1 输入
3 60
样例 1 输出
4
说明 / 提示
There are 4 possibilities for :
- .
- .
- .
- .
Constraints: For of the testdata, .
Source: NOIP 2001 Junior, Problem 2.
Translated by ChatGPT 5