摘要: 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) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1205思路:只要除了数目最多的糖果以外的其他所有糖果的数目之和加1(小心这里要用int64),大于等于数目最多的糖果数,就能吃完,否则不能。#include<stdio.h>int main(){ __int64 n,x,sum,max,t,i; scanf("%I64d",&t); while(t--) { scanf("%I64d",&n); max=sum=0; for(i=0;i<n;i++) { scanf("... 阅读全文
posted @ 2013-05-27 20:13 执着追求的IT小小鸟 阅读(213) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1048按题目中给出的数据对号入座就好,特别注意F对应的是A#include<stdio.h>#include<string.h>int main(){ char s[1000],start[100],end[100],c[10]; int i; while(scanf("%s",start),strcmp(start,"ENDOFINPUT")) { gets(c); gets(s); gets(end); for(i=0;s[i]!=' 阅读全文
posted @ 2013-05-27 19:19 执着追求的IT小小鸟 阅读(182) 评论(0) 推荐(0) 编辑