About this question

Factorial Trailing Zeros

Hard · Number Theory & Algorithms · Quant Trader interview question · math, factorials, number-theory, legendres-formula, interview-classic

You are working on a custom Big Integer arithmetic library for a crypto-currency exchange, specifically optimizing the storage of massive factorial numbers used in permutation calculations. A common compression technique involves stripping trailing zeros before storage. Without calculating the full value, determine the exact number of trailing zeros in $100!$ (100 factorial).