Educational Codeforces Round 106 (Rated for Div. 2) D. The Number of Pairs 数论gcd题意:思路:
传送门文章目录题意:思路:题意:给三个数c,d,xc,d,xc,d,x,求满足c∗lcm(a,b)−d∗gcd(a,b)=xc*lcm(a,b)-d*gcd(a,b)=xc∗lcm(a,b)−d∗gcd(a,b)=x条件的(a,b)(a,b)(a,b)的数量。思路:考虑将lcm(a,b)lcm(a,b)lcm(a,b)表示成k∗gcd(a,b)k*gcd(a,b)k∗gcd(a,b),随后将式子化简(c∗k−d)∗gcd(a,b)=x(c*k-d)*gcd(a,b)=x(c∗k−d)∗gcd(a