Data Structures & AlgorithmsHardGATE CS · ICPC regional

How many integers x in [1, 100] satisfy x ≡ 3 (mod 4) and x ≡ 7 (mod 10)?

  1. A. 6
  2. B. 7
  3. C. 9
  4. D. 5

Correct answer: D. 5

The two conditions combine to x ≡ 7 (mod 20), giving 7, 27, 47, 67 and 87 in range.

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

Exams that ask this topic