RunTime error in Small factorials help me please!

and here is my solution

http://www.codechef.com/viewsolution/2651693

Firstly , you are getting runtime error as when declaring a you have used n , which is not yet defined , so declare a after taking the input of n .
Secondly , after changing that also you will get WA as the range of int is only 10^9 , while the maximum range of ans is much much greater than that appromiatel 160 decimal places , so you can`t store it in int.

1 Like
//