69,371
社区成员
发帖
与我相关
我的任务
分享
仅供参考
#include <stdio.h>
int main(int argc,char *argv[])
{
int inum=1000,i=0,j=0,icount=1,temp,jinwei,result=0;
int ires[50000]={0};
for(i=2;i<inum;i++)
{
jinwei=0;
for(j=1;j<icount;j++)
{
temp=ires[j]*i+jinwei;
ires[j]=temp%10;
jinwei=temp/10;
}
while(jinwei)
{
ires[++icount]=jinwei%10;
jinwei/=10;
}
}
for(j=1;j<=icount;j++)
{
if(ires[j]==0)
{
result++;
}
else
{
printf("总共有%d个0",result);
return 0;
}
}
return 0;
}