Help in finding errors

Please look for errors in the code-:
link for the question:

here is the link for the answer:

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: