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