Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris.Larry Wall

Trailing zeros are a sequence of 0s in the decimal representation of a number, after which no other digits follow. Example 320 has one tailing zero.

The number if trailing zeros in the representation of factorial. The factorial is not negative integer number which is the product of numbers.

Example:-

Input 23, the factorial calculated by

23! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x 11 x 12 x 13 x 14 x 15 x 16 x 17 x 18 x 19 x 20 x 21 x 22 x 23

23! = 25852016738884976640000

Result = 4.

The Trailing Zeros of 23!:4 The Trailing Zeros of 101!:24

## Comments

Please login to add comments.