You are given N elements of an array. You need to find number of trailing zeros in the product of all these N elements.
Trailing zeros are a sequence of 0 in the decimal representation (or more generally, in any positional representation) of a number, after which no other digits (except 0) follow.
Example. Trailing zeros : 3 in 101000 , 2 in 10200, 0 in 2132, 0 in 10011.
Input Format:
First line contains N, total number of elements.
Second line contains N space separated integers A[i]s.
Output Format:
Print the only integer indicating number of trailing zeros in the product of all elements.
Constraints:
1<=N<=100000
1<=A[i]<=10^9
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
No editorial available for this problem.