# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Poltu gives a problem to his friend Boltu. The description is given below-

You are given an integer N. You have to calculate the number of trailing zero of **1! × 2! × 3! × 4! × 5! ×……× (N - 1)! × N!**

Here,
**0**! = **1** and **A**! = **A** × (**A** - **1**)!

If you don't know about **trailing zero**, see this.

The first line contains an integer **T** (**1** ≤ **T** ≤ **10**^{5}), number of test case.

Every Test case contains an integer **N** (**1** ≤ **N** ≤ **10**^{9}).

For each test case, print the case number and the result of this problem.

Input | Output |
---|---|

3 4 5 10 | Case 1: 0 Case 2: 1 Case 3: 7 |

44% Solution Ratio

prodip_bsmrstuEarliest,

steinumFastest, 0.0s

prodip_bsmrstuLightest, 3.0 MB

steinumShortest, 413B

Login to submit

In this problem, you have to find the occurrence of 5 in 1! × 2! × 3! × 4! × 5! ×……× (N - 1)! × N! Y...