Data Structures & AlgorithmsModerateTCS NQT · ICPC regional
Problem: The number of decimal digits in 100! is what value?
- A. 158
- B. 157
- C. 24
- 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
- Problem: What is gcd(462, 1071)?
- Problem: What is the determinant of the matrix [[2, 1], [1, 3]]?
- Problem: How many permutations of the letters A, B, C, D leave no letter in its original position (for example, A is not in the first…
- Problem: The sum of all integers from 1 to 200 that are divisible by neither 4 nor 7 is what value?
- Problem: How many integers from 1 to 100 inclusive are divisible by 7 but not by 14?
- Problem: What is the least common multiple of 6, 8 and 12?