数论 gcd 看到这个题其实知道应该是和(a+k)(b+k)/gcd(a+k,b+k)有关,但是之后推了半天,思路全无. 然而..有一个引理: gcd(a, b) = gcd(a, b - a) = gcd(b, b - a) (b > a) 证明一下: 令 gcd(a, b) = c, (b > a) 则有 a % c = 0, b % c = 0 那么 (a - b) % c = 0 令 gcd(a, b - a) = c', 假设c' != c 则有 a % c' = 0, (b - a…