#Lutece3021. 简单数论 2
简单数论 2
Migrated from Lutece 3021 简单数论 2
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
这是一道简单的数论题,至少它的题面很简单。
给出若干组正整数 和 ,求方程 关于 和 在模 意义下解的组数。其中 是奇数且不含平方因子。
Input
第一行包括一个正整数 ,表示询问组数。
接下来 行每行包括两个正整数 。
Output
输出 行,第 行包括一个正整数,代表第 个方程解的组数。
Samples
1
5 0
9
Note
组解分别为 $(a,b) = (0,0),(1,2),(1,3),(2,1),(2,4),(3,1),(3,4),(4,2),(4,3)$。
Resources
2023 UESTC ICPC Training for Math