A * B) mod C = (A mod C * B mod C) mod C
乘法示例:
让 A=4, B=7, C=6 让我们验证:(A * B) mod C = (A mod C * B mod C) mod C LHS= 等式的左边 LHS= 等式的右边 LHS = (A * B) mod C LHS = (4 * 7) mod 6 LHS = 28 mod 6 LHS = 4 RHS = (A mod C * B mod C) mod C RHS = (4 mod 6 * 7 mod 6) mod 6 RHS = (4 * 1) mod 6 RHS = 4 mod 6 RHS = 4 LHS = RHS = 4(A + B) mod C = (A mod C + B mod C) mod C
示例:
让 A=14, B=17, C=5 让我们证明:(A + B) mod C = (A mod C + B mod C) mod CLHS = 等式左边
RHS = 等式右边 LHS = (A + B) mod C
LHS = (14 + 17) mod 5
LHS = 31 mod 5
LHS = 1 RHS = (A mod C + B mod C) mod C
RHS = (14 mod 5 + 17 mod 5) mod 5
RHS = (4 + 2) mod 5
RHS = 1 LHS = RHS = 1 标签:运算,17,RHS,LHS,等式,14,mod From: https://www.cnblogs.com/zaiyewujiang/p/16928140.html