首先,根据题意,我们可以列出同余方程:
( x + k m ) % L = = ( y + k n ) % L (x+km) \% L= = (y+kn)\%L (x+km)%L==(y+kn)%L
( x + k m ) − ( y + k n ) = a L (x+km)-(y+kn)=aL (x+km)−(y+kn)=aL
( m − n ) k + y − x = a L (m-n)k+y-x=aL (m−
首先,根据题意,我们可以列出同余方程:
( x + k m ) % L = = ( y + k n ) % L (x+km) \% L= = (y+kn)\%L (x+km)%L==(y+kn)%L
( x + k m ) − ( y + k n ) = a L (x+km)-(y+kn)=aL (x+km)−(y+kn)=aL
( m − n ) k + y − x = a L (m-n)k+y-x=aL (m−