1907GCD & LCM

1907   GCD & LCM

题目描述

Given x and y (2 <= x <= 100,000, 2 <= y <= 1,000,000), you are to count the number of p and q such that:

1) p and q are positive integers;

2) GCD(p, q) = x;

3) LCM(p, q) = y.

输入格式:

x and y, one line for each test.

输出格式:

Number of pairs of p and q.

输入样例 复制
3 60
输出样例 复制
4

说明

6
23
通过提交
时空限制2000ms/64mb
题目来源ZOJ Monthly, April 2003
评测方式在线评测
题目类型
难        度