Data Structures & AlgorithmsModerateCodeforces Div2 B-D · ICPC regional

How many pairs (a, b) with 1 <= a <= b <= 20 satisfy a * b = 36?

  1. A. 4
  2. B. 5
  3. C. 7
  4. D. 22

Correct answer: A. 4

Enumerate divisors a of 36 with a <= b. The unordered count skips reversed duplicates: (1,36) is out of range, leaving pairs with a at most 6.

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

Exams that ask this topic