Data Structures & AlgorithmsModerateCAT · TCS NQT

Problem: The product of the numbers from 1 to 10, divided by the product of the numbers from 1 to 7, is what value?

  1. A. 518400
  2. B. 6
  3. C. 720
  4. D. 5040

Correct answer: C. 720

10!/7! cancels to 8 · 9 · 10 = 720. Dividing 10! by 7 gives 518400, 3! = 6 confuses the count of factors with their product, and 10 · 9 · 8 · 7 = 5040 cancels only 6!.

More Coding Interview Problems questions

Exams that ask this topic