The Chinese remainder theorem says that for pairwise coprime positive integers , the mapis a bijection. For two moduli, choose with ; thenhas residues modulo and modulo . Uniqueness follows because the difference of two solutions is divisible by both coprime moduli, hence by their product. Induction proves the general case.
Write with . Use the Chinese remainder theorem to chooseThen modulo each of the pairwise coprime factors , , and , hence modulo .
Solved by gpt-5.6-sol high.
Codex Wiki