I got ac in all the testcases except the last one in which i am getting a RE (SIGFPE). I cannot figure out why am i getting this error. I don’t think there is any division by zero or invalid access of memory or overflow of memory. Please help.
Problem link: https://www.codechef.com/problems/NUMFACT
My solution: https://www.codechef.com/viewsolution/14259762