#P2257. YY的GCD
YY的GCD
Description
After studying number theory, YY gave kAc a problem.
Given , find the number of pairs such that , , and is a prime.
Input Format
The first line contains an integer denoting the number of test cases.
Then follow lines, each containing two positive integers .
Output Format
Output lines, each containing one integer, the answer for the -th test case.
2
10 10
100 100
30
2791
Hint
, .
Translated by ChatGPT 5
京公网安备 11011102002149号