Why WA on Factorial problem

Question link:
https://hack.codingblocks.com/app/practice/8/137/problem

Here is my solution ,

Why above logic is wrong ,i used to apply this concept to find number of factor , in aptitude questions, but here I am getting WA.

Can you give me any testcase and actual answer so that i can debug this.
Can you suggest any changes??