All submissions for this problem are available.
To find the zeroes in a factorial of a number. In this problem, we have to find the number of zeroes following a non negative number in a factorial of a number. Suppose the number entered is 6 and we know factorial of 6 is 720 thus there is only one zero after a non- negative number, so the output is 1.
The first number N indicates the number of test cases to be followed.It stands for number of numbers to be followed. Then there are N lines each containing exactly one positive integer for which the solution to be found out.
For every number, output a single line containing the single non negative integer.
Input:Sample Input 6 3 18 Output: 1 0 5
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.