#include
using namespace std;
int main() {
int n;
cin>>n;
int ans=1;
if(n==0){
cout<<β1β;
}
for(int i=1;i<=n;i++){
ans=ans*i;
}
cout<<ans;
return 0;
}
Why arent the test cases passing
using this method you canβt find factorial of large no
Factorial of 100 has 158 digits. It is not possible to store these many digits even if we use long long int.
I hope Iβve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.