我们知道,例如两个幂的模数可以这样表达:
x % 2 inpower n == x & (2 inpower n - 1).
例子:
x % 2 == x & 1 x % 4 == x & 3 x % 8 == x & 7
两个数字的一般非权力怎么样?
让我们说:
x%7 ==?
algorithm
algorithm ×1