加法:(a + b)% m =(a % m + b % m )% m
减法:(a - b)% m =(a % m - b % m )% m
乘法:(a * b)% m =( a % m * b % m )% m
乘方:(a ^ b)% m = ( ( a % m )^ b)% m
除法:(a / b)% m = (a * b ^(m - 2 ))%m (m是素数)
a = a / m + a % m
a % m = a - a / m
负数取模可以这样算
取模运算性质
最新推荐文章于 2023-11-13 23:26:14 发布