UPD:Got AC
PDF LINK: http://lightoj.com/volume_showproblem.php?problem=1138&language=english&type=pdf Problem link: http://lightoj.com/volume_showproblem.php?problem=1138
I think the solution is the number of 5s as prime factor in N! But how to calculate them faster.