Wrong Answer
/in/foo.c: In function 'main': /in/foo.c:8:13: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=] printf("%d", total); ^
代码
#include<stdio.h>
int main()
{
long int a, total=1;
scanf("%ld", &a);
for (long int i=a; i>0; i--)
total *= i;
printf("%d", total);
return 0;
}