Help me in solving FCTRL2 problem

My issue

it’s giving the right output even though , giver wrong answer on the site whyyy

My code

#include <iostream>
using namespace std;
int main() {
    int t;
    cin>>t;
    while(t--){
    int n;
    cin>>n;
    int fact=1;
    for(int i=1 ; i<=n ; ++i ){
        fact*=i;
    }
    cout<<fact<<endl;
}}

Problem Link: FCTRL2 Problem - CodeChef

I believe this has to do with the size of the factorial. If you look at some successful submissions for the problem in C++, you’ll see that they include an extra header which gives them a variable type that allows them to handle such large numbers.

For a lot of problems, you can look at previous submissions. You’ll see them ranked by popularity or you can manually go through a few. A lot of these are well explained by the coders. That’s probably a good first way to start if you are stuck, since responses here will probably be slow.