Simple Chinese Yuetings

xiaoxiao2021-03-05  23

Detailed preferences and proof of China's remainder theorem are not expounded, and only some simple solutions are given. There is the following application

X = a1 mod m1x = a2 mod m2 ... x = ai mod mi

Where M1..mi is mutual number, seeking X can do X = (A1 * C1 A2 * C2 ... AI * CI)% N according to CRT, where n = m1 * m2 * ... * Mi = MI * MI ^ mi = n / mimi ^ satisfying (MI * mi ^)% mi = 1

See the following example x = 2 mod 3x = 3 mod 5x = 2 mod 7

C1 = 35 * 2, C2 = 21 * 1, C3 = 15 * 1x = (2 * 70 3 * 21 2 * 15)% 105 = 23

转载请注明原文地址:https://www.9cbs.com/read-39315.html

New Post(0)