Data Structures & AlgorithmsModerateTCS NQT · number theory

Problem: How many positive divisors does 2^4 * 3^2 * 5 * 7 have?

  1. A. 60
  2. B. 45
  3. C. 90
  4. D. 120

Correct answer: A. 60

The divisor count is the product of (exponent + 1), giving 5 * 3 * 2 * 2 = 60. The trap 120 comes from using the exponents themselves instead of exponent + 1 for the 5 and 7 factors.

More Coding Interview Problems questions

Exams that ask this topic