If N is an integer greater than 0, n factorial (n!) is the product: n × (n-1) × (n-2) × (n-3) × … …
Click here to read the complete problem statement.
If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.
#include<stdio.h>
int main(){
unsigned long n,i,s=1;scanf(“%lu”,&n);for(i=1;i<=n;i++)s*=i;printf(“%lu\n”,s);}
what are the difference between those two logics?
Speaking of problems, I think there is none. @hjr265 , I think you should look into this problem a little.
I can also not find any reason for my submission to be rejected.
By the way, I have unlocked the editorial, if my submissions are accepted then I will request you to fix it also. (the drawbacks of unlocking the tutorial)