Data Structures & AlgorithmsModerateTCS NQT · ICPC regional

Problem: The number of decimal digits in 100! is what value?

  1. A. 158
  2. B. 157
  3. C. 24
  4. D. 201

Correct answer: A. 158

log₁₀(100!) ≈ 157.97, so the digit count is floor + 1 = 158. Forgetting the + 1 gives 157, 24 is the number of trailing zeros, and treating 100! as 100¹⁰⁰ = 10²⁰⁰ gives 201.

More Coding Interview Problems questions

Exams that ask this topic