My issue
include <stdio.h>
int main() {
int t;
scanf(“%d”, &t);
while (t--) {
int a;
scanf("%d", &a);
int s = 1;
for (int i = 2; i <= a; i++) {
s = s * i;
}
printf("%d\n", s);
}
return 0;
}
what mistake i have done in this code
My code
#include <stdio.h>
int main() {
int t;
scanf("%d", &t);
while (t--) {
int a;
scanf("%d", &a);
int s = 1;
for (int i = 2; i <= a; i++) {
s = s * i;
}
printf("%d\n", s);
}
return 0;
}
Problem Link: FCTRL2 Problem - CodeChef