Qm

How many zeros end 25 factorial in base twelve?

The number 25! (25 factorial, the product of 1 to 25) is written out in base 12.

How many zeros are at the end of it? Explain the method so that it works for any factorial in any base, and say which prime factor turns out to be the bottleneck here and why it is a different one from the familiar base-10 case.

Show a hint

A trailing zero in base 12 means a factor of 12. Twelve is 2 squared times 3. Count how many factors of 2 and of 3 are hiding in 25!.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

The number that equals the sum of the factorials of its digitsThe smallest number divisible by everything up to 20The smallest number with exactly twelve divisorsA number that is both a square and a cubeWriting 100 as a sum of consecutive numbers
All questions →