上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 51 下一页
摘要: 2011-12-15 15:06:33地址:http://acm.hdu.edu.cn/showproblem.php?pid=1064题意:求12个数的平均数- -。代码:# include <stdio.h>int main (){ int i ; double sum = 0, num ; for (i = 0 ; i < 12 ; i++) { scanf ("%lf", &num) ; sum += num ; } printf ("$%.2lf\n", sum/12.0) ; return 0 ;} 阅读全文
posted @ 2012-01-06 16:04 Seraph2012 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 14:49:48地址:http://acm.hdu.edu.cn/showproblem.php?pid=1049题意:有个蜗牛,每分钟向上爬u,第二分钟休息,下滑d。问几分钟能爬到n长的杆顶。mark:肯定是有公式,但处理边界麻烦,直接模拟。代码:# include <stdio.h>int main (){ int n, u, d, minutes, cur ; while (~scanf ("%d%d%d", &n, &u, &d) && (n||u||d)) { cur = 0, minute 阅读全文
posted @ 2012-01-06 16:03 Seraph2012 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 15:02:44地址:http://acm.hdu.edu.cn/showproblem.php?pid=1062题意:倒序单词输出。mark:wa了一次,把范围1000看成100, 2B了。代码:# include <stdio.h>char str[1100] ;char word[1100] ;void gao(char str[]){ word[100] = '\0' ; int i, cnt = 99 ; for (i = 0 ; str[i] ; i++) { if (str[i] == ' ') { ... 阅读全文
posted @ 2012-01-06 16:03 Seraph2012 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 14:45:28地址:http://acm.hdu.edu.cn/showproblem.php?pid=2115题意:nba技巧赛,输入人名,分钟,秒钟。按时间少到多排序,并输出rank。mark:PE一次,每组case之间空一行。代码:# include <stdio.h># include <stdlib.h># include <string.h> typedef struct NODE{ char name[50] ; int mm, ss ;}NODE ;NODE node[20] ;int cmp(const void * 阅读全文
posted @ 2012-01-06 16:01 Seraph2012 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 14:28:07地址:http://acm.hdu.edu.cn/showproblem.php?pid=2520题意:中文。。。找规律,n^2。注意long long。代码:# include <stdio.h> int main (){ long long n ; scanf ("%I64d", &n) ; while (~scanf ("%I64d", &n)) { n = n*n % 10000 ; printf ("%I64d\n", n) ; } return 0 ;} 阅读全文
posted @ 2012-01-06 15:59 Seraph2012 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 07:09:00纪念~。本来说今天只做25题的,晚上实在没事,做做就接近百题了,干脆冲百。今天一共做了50题,难度明显比以前大了。 阅读全文
posted @ 2012-01-06 15:57 Seraph2012 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 07:04:57地址:http://acm.hdu.edu.cn/showproblem.php?pid=2123题意:做一个N*N的乘法表,第i行第j个表示i*j。代码:# include <stdio.h>int main (){ int n, i, j ; scanf ("%d", &n) ; while (~scanf ("%d", &n)) { for (i = 1 ; i <= n ;i++) { for (j = 1 ; j <= n ;j++) if (... 阅读全文
posted @ 2012-01-06 15:55 Seraph2012 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 07:08:43地址:http://acm.hdu.edu.cn/showproblem.php?pid=2030题意:中文。汉字的ascii码二进制最高位是1。代码:# include <stdio.h>char str[1100] ;int calc (char str[]){ int i, sum = 0 ; for (i = 0 ; str[i] ; i++) if (str[i] & 0x80) sum++, i++ ; return sum ;}int main (){ int T ; scanf ("%d%*c",.. 阅读全文
posted @ 2012-01-06 15:55 Seraph2012 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 07:01:39地址:http://acm.hdu.edu.cn/showproblem.php?pid=2103题意:叙述了一个超生罚款的政策。一对夫妇如果生了超过M个小孩,或者已经生有男孩还继续生孩子,罚款。每次罚款的数额是上一次的2倍,一开始是10000。mark:wa了2次,把10000写成了1000,各种2。注意要long long。代码:# include <stdio.h>int main (){ int i, T, m, n ; int flag, num ; long long sum, cur ; scanf ("%d" 阅读全文
posted @ 2012-01-06 15:54 Seraph2012 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 06:42:37地址:http://acm.hdu.edu.cn/showproblem.php?pid=2100题意:中文。mark:26进制高精度,没啥好说的。代码:# include <stdio.h># include <string.h>char a[210], b[210] ;int aa[210], bb[210], buff[210] ;void s2n(char *s, int n[]){ int i, len ; n[0] = 1, n[1] = 0 ; while (*s == 'A') s++ ; len = 阅读全文
posted @ 2012-01-06 15:53 Seraph2012 阅读(147) 评论(0) 推荐(0) 编辑
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 51 下一页