标签:ble 整数 sample name print content mat set logs
Problem Description
#include <iostream> #include <algorithm> #include <stdio.h> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <ctype.h> using namespace std; int a[50000]; int main() { int n; while(scanf("%d",&n)!=EOF) { int i,j,carry,len=1,t; memset(a,0,sizeof(a)); a[0]=1; for(i=2;i<=n;i++) { for(carry=0,j=0;j<len;j++) { t=a[j]*i+carry; a[j]=t%10; carry=t/10; } while(carry) { a[j++]=carry%10; carry/=10; len++; } } for(j=len-1;j>=0;j--) printf("%d",a[j]); printf("\n"); } return 0; }
标签:ble 整数 sample name print content mat set logs
原文地址:http://www.cnblogs.com/gonsedup/p/7262299.html