[Solved] CodeChef Small factorial Solution
The problem, as M Oehm has pointed out in the comments, is with the data type that you are using for fact. It is too small to store the factorial of numbers like 100, which contain around 157 digits. You need to use an array to store the digits. Here is my approach to the … Read more