Re: [问题] 有一题我解不出来(哭)

楼主: xatier (一切重来就好了...)   2009-08-11 15:47:01
最简单的作法:
#include<stdio.h>
long long n,count;
int main(){
while(scanf("%I64d",&n)!=EOF){
count=0;
while(n>=5){
n/=5;
count+=n;
}
printf("%I64d\n",count);
}
return 0;
}
题目:
ZJd122 "Oh! My Zero!!
楼主: xatier (一切重来就好了...)   2009-08-11 15:49:00
毛起来除以五就对啦!!

Links booklink

Contact Us: admin [ a t ] ucptt.com