Data Structures & AlgorithmsModerateCodeforces Div2 C · CRT

Problem: The Chinese remainder theorem gives a unique solution modulo M for a system of congruences under which condition?

  1. A. All moduli are equal
  2. B. All moduli are even
  3. C. The moduli are pairwise coprime
  4. D. All remainders are zero

Correct answer: C. The moduli are pairwise coprime

Pairwise coprimality makes the combined modulus M = product of moduli and gives a unique residue class.

More Coding Interview Problems questions

Exams that ask this topic