CF900D.Unusual Sequences
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Count the number of distinct sequences a1,a2,...,an ( 1<=ai ) consisting of positive integers such that gcd(a1,a2,...,an)=x and . As this number could be large, print the answer modulo 109+7 .
gcd here means the greatest common divisor.
输入格式
The only line contains two positive integers x and y ( 1<=x,y<=109 ).
输出格式
Print the number of such sequences modulo 109+7 .
输入输出样例
输入#1
3 9
输出#1
3
输入#2
5 8
输出#2
0
说明/提示
There are three suitable sequences in the first test: (3,3,3) , (3,6) , (6,3) .
There are no suitable sequences in the second test.