标签:ring 精度 std can define log mem return scan
#include<stdio.h> #include<string.h> #define maxn 3000 int f[maxn]; int main() { int n,i,j; scanf("%d",&n); memset(f, 0, sizeof(f)); f[0] = 1; for( i = 2;i <= n; i++) { int c=0; for( j = 0; j < 3000; j++) { int s = f[j] * i + c; f[j] = s % 10; c = s / 10; } } for(j = maxn-1;j >= 0; j--) if(f[j])break; for(i = j; i >= 0 ;i--) printf("%d",f[i]); return 0; }
标签:ring 精度 std can define log mem return scan
原文地址:http://www.cnblogs.com/ljzh/p/6358933.html