Data Structures & AlgorithmsHardCodeforces Div2 B-D · ICPC regional

How many ordered pairs (x, y) with 1 <= x, y <= 12 have x * y divisible by 12?

  1. A. 40
  2. B. 41
  3. C. 39
  4. D. 12

Correct answer: A. 40

Enumerate all 144 ordered pairs and test divisibility. The count is larger than the number of multiples of 12 alone because products can contain 2 and 3 separately.

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

Exams that ask this topic