Help in finding errors

Please look for errors in the code-:
link for the question:
https://www.codechef.com/problems/FCTRL2
here is the link for the answer:
https://www.codechef.com/submit/FCTRL2

No it isn’t :wink: This is, though :slight_smile:

sorry,my bad.
Please look for errors in the solution.

Hmmm … there’s quite a bit wrong here :slight_smile:

Firstly, it doesn’t appear to handle the case where T=1:

1
5

Also, what is this line doing? Is that how factorials are calculated?

F[i]*=N[i];

Also, even if those bugs are fixed, there’s still the problem of overflowing an int - see this recent thread for more info! :slight_smile: