Data Structures & AlgorithmsHardGATE CS · ICPC regional

What is the smallest integer x greater than 100 with x congruent to 3 modulo 7 and x congruent to 5 modulo 11?

  1. A. 116
  2. B. 117
  3. C. 119
  4. D. 115

Correct answer: D. 115

The Chinese remainder theorem gives a unique solution modulo 77; search upward from 101 and check both congruences.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic