HDU1124
推理
一個數(shù)字含有一個5就能有一個0,但是在計數(shù)的時候要除去這個5,再去進行新的計算。
View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<math.h> 4 typedef __int64 int64; 5 int main(){ 6 int t; 7 scanf("%d",&t); 8 while( t-- ){ 9 int64 n; 10 scanf("%I64d",&n); 11 int64 ans=0; 12 int64 now=5; 13 while( n>=now ){ 14 ans+=(n/now); 15 n/=now; 16 } 17 printf("%I64d\n",ans); 18 } 19 return 0; 20 }?
轉(zhuǎn)載于:https://www.cnblogs.com/xxx0624/archive/2013/02/09/2909657.html
總結(jié)
- 上一篇: java对象的生命周期及回收
- 下一篇: indent 的格式