Data Structures & AlgorithmsHardGATE CS · ICPC regional

How many integers n with 1 <= n <= 200 have exactly 6 trailing zeros in n! (written in base 10)?

  1. A. 6
  2. B. 5
  3. C. 7
  4. D. 9

Correct answer: B. 5

The number of trailing zeros of n! is floor(n/5) + floor(n/25) + ..., and it equals 6 exactly for n = 25 to 29.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic