1151: 最大公约数和最小公倍数问题

文件提交:无需freopen 内存限制:128 MB 时间限制:1.000 S
评测方式:普通裁判 命题人:
提交:1 解决:1

题目描述

输入两个正整数 lns="http://www.w3.org/1998/Math/MathML">0,0,求出满足下列条件的 lns="http://www.w3.org/1998/Math/MathML">, 的个数:

  1. lns="http://www.w3.org/1998/Math/MathML">, 是正整数。

  2. 要求 lns="http://www.w3.org/1998/Math/MathML">, 以 lns="http://www.w3.org/1998/Math/MathML">0 为最大公约数,以 lns="http://www.w3.org/1998/Math/MathML">0 为最小公倍数。

试求:满足条件的所有可能的 lns="http://www.w3.org/1998/Math/MathML">, 的个数。

输入

一行两个正整数 lns="http://www.w3.org/1998/Math/MathML">0,0

输出

一行一个数,表示求出满足条件的 lns="http://www.w3.org/1998/Math/MathML">, 的个数。

样例输入

3 60

样例输出

4

提示

 有 lns="http://www.w3.org/1998/Math/MathML">4 种:

  1. lns="http://www.w3.org/1998/Math/MathML">3,60
  2. lns="http://www.w3.org/1998/Math/MathML">15,12
  3. lns="http://www.w3.org/1998/Math/MathML">12,15
  4. lns="http://www.w3.org/1998/Math/MathML">60,3

对于 lns="http://www.w3.org/1998/Math/MathML">100% 的数据,lns="http://www.w3.org/1998/Math/MathML">20,0105