Need help , i am unable to figure out the error (beginner level question / c++)

C++ related beginner level problem

It says that “wrong answer” , i am unable to find the flaw in the code . It would be appreciable if someone could help me out with the error i made ! Below are the details

The Link to the Problem : https://www.codechef.com/problems/FCTRL2

My Solution: https://www.codechef.com/viewsolution/21642622

Any suggestions or advices are most welcome !

Try using long long int instead of int.

PS: I don’t know how c++ works but just give it a try :slight_smile:

100!=933262154439441526816992388562667004907159682643816214...nearly a hundred more digits...

These many digits are not supported by any standard c|cpp container. I have done it using trivial multiplication also called super carry method whose implementation is available HERE.

I tried replacing int with long long int as you suggested , but it is still displaying wrong answer . Sorry

//