In Mr. Tu's ICS2O class, you were tasked to write a program that rates the overall worth of a set of numbers (worth is equal to the number of trailing zeros when all of the numbers in the set are multiplied together).
Trailing zeros are defined as the zeros at the end of a number (Ex. 102000 has 3 trailing zeros).
Given a set of numbers, Mr. Tu would like you to determine the overall worth of the set.
Input Specification
The first line will contain the integer, , representing how many integers will be in the set.
The next lines will contain one integer, , representing an integer in the set.
Output Specification
Output the overall worth of the integers.
Subtasks
Subtask 1 [15%]
Subtask 2 [85%]
No further constraints are given.
Sample Input 1
3
2
19
10
Sample Output 1
1
Explanation for Sample 1
, therefore there is only one trailing zero.
Sample Input 2
5
10
8
15
10
10
Sample Output 2
4
Explanation for Sample 2
, therefore there are 4 trailing zeros.
Comments