Data Structures & AlgorithmsModerateSSC CGL Tier 2 · TCS NQT

Problem: How many positive divisors does 720 have?

  1. A. 30
  2. B. 8
  3. C. 29
  4. D. 15

Correct answer: A. 30

720 = 2⁴ · 3² · 5, so the divisor count is (4 + 1)(2 + 1)(1 + 1) = 30. Multiplying the exponents without adding 1 gives 8, leaving out 720 itself gives 29, and counting divisor pairs d · (720 / d) gives 15.

More Coding Interview Problems questions

Exams that ask this topic