No it isn’t This is, though
Please look for errors in the solution.
Hmmm … there’s quite a bit wrong here
Firstly, it doesn’t appear to handle the case where T=1:
Also, what is this line doing? Is that how factorials are calculated?
Also, even if those bugs are fixed, there’s still the problem of overflowing an int - see this recent thread for more info!