#P1552. Bash Plays with Functions
Bash Plays with Functions
描述
Bash got tired on his journey to become the greatest Pokemon master. So he decides to take a break and play with functions.
Bash defines a function , which denotes the number of ways of factoring into two factors and such that . In other words, is the number of ordered pairs of positive integers such that and .
But Bash felt that it was too easy to calculate this function. So he defined a series of functions, where is defined as:
Where is any ordered pair of positive integers, they need not to be co-prime.
Now Bash wants to know the value of for different and . Since the value could be huge, he would like to know the value modulo Help him!
中文题意
定义为 且 的对数。
定义:
次询问,每次回答.
数据范围:
输入
The first line contains an integer — the number of values Bash wants to know.
Each of the next lines contain two integers and which denote Bash wants to know the value .
输出
Print integers. For each pair of and given, print modulo on a separate line.
样例
5
0 30
1 25
3 65
2 5
4 48
8
5
25
4
630