WA in ICL802

solution:CodeChef: Practical coding for everyone
what is wrong with solution?
It would be nice if someone can point out the error.

Thanks in advance.

Update numerator in each step, otherwise it will depend on the precision.