大数n的阶乘,为什么提交显示运行错误
http://acm.hdu.#include <stdio.h>
int main()
{
int i,n,h,j,t;
int z[10086];
while(scanf("%d",&n)!=EOF)
{
z[1]=1;t=1;
for(i=2;i<=n;i++)
{
h=0;
for(j=1;j<=t;j++)
{
z[j]=z[j]*i+h;
h=z[j]/10;
z[j]=z[j]%10;
}
while(h>0)
{
z[j]=h%10;
h=h/10;
j++;
}
t=j-1;
}
for(i=t;i>=2;i--)
printf("%d",z[i]);
printf("%d\n",z[1]);
}
return 0;
}