「CF1295」Same GCDs

#1295D. Same GCDs

Summarize

给定正整数 $a$,$m$($a<m$)。计算符合条件的 $x\in[0,m)$ 的个数,使得 $\text{gcd}(a,m)=\text{gcd}(a+x,m)$。

$a\le 1e10,m\le 1e10$

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×