Hi,if u cannot understand the problem properly ,then:
(1)The best way to do is to read the problem statement as many times as you can, read it part-wise , try to note the parameters and other important points .
(2)Try to read the the queries and problem setter answers in the discussion forum on the question page.Because most of the time,the doubts/queries are common.
(3)Another best way is to try solving the easy problems (as the easy problems are even easier to understand) in the practice section,then gradually start practicing the difficult one.
Secondly the factorial problem that you asked is not difficult to understand .Just ignore the entire story and concentrate on this line only
“the function Z. For any positive integer N, Z(N) is the number of zeros at the end of the decimal form of number N!.”
Apparently, this problem asks you to print the number of trailing zeros the factorial of input N has.
The factorial of 9 is 36288***0*** .So the number of trailing zero is one ,hence answer is 1 (I have italicized and bold those zeros for convenience).
Factorial(20)=243290200817664***0000*** There are four Trailing Zeros .so Answer is 4.