杭电acm1124

http://acm.hdu.edu.cn/showproblem.php?pid=1124

由前几个可以知道,总共数里面含有几个5,就有几个0

#include<stdio.h>
int main()
{
    __int64 f,sum;
  int t;
 scanf("%d",&t);
 while(t--)
 {
  sum=0;
  scanf("%I64d",&f);
  while(f)
  {
   f/=5;
   sum+=f;
  }
  printf("%I64d\n",sum);
 }
 return 0;
}

posted @ 2013-05-27 23:16  执着追求的IT小小鸟  阅读(121)  评论(0编辑  收藏  举报