上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 51 下一页
摘要: 2011-12-15 02:19:58地址:http://acm.hdu.edu.cn/showproblem.php?pid=2109题意:中文。。废话超多。代码:# include <stdio.h># include <stdlib.h># define REP(i,n) for(i = 0 ; i < n ; i++)int cmp(const void *a, const void *b){ return *(int*)a - *(int*)b ;}int main (){ int n, _1, _2, i; int a[110], b[110] ; w 阅读全文
posted @ 2012-01-06 14:59 Seraph2012 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 02:06:24地址:http://acm.hdu.edu.cn/showproblem.php?pid=2101题意:两数和是否是86的倍数。代码:# include <stdio.h>int main (){ int a, b ; while (~scanf ("%d%d", &a, &b)) puts (((a+b)%86) ? "no" : "yes") ; return 0 ;} 阅读全文
posted @ 2012-01-06 14:58 Seraph2012 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 01:59:41地址:http://acm.hdu.edu.cn/showproblem.php?pid=2076题意:中文。。。mark:换算有点麻烦,其实无难点。代码:# include <stdio.h># include <math.h>int main (){ int T, h,m,s,a ; double hh, mm ; double arg ; scanf ("%d", &T) ; while (T--) { scanf ("%d%d%d", &h, &m, & 阅读全文
posted @ 2012-01-06 14:57 Seraph2012 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 02:03:44地址:http://acm.hdu.edu.cn/showproblem.php?pid=2055题意:字母替换成数字,求和,简单~~代码:# include <stdio.h># include <math.h>int main (){ int T, num ; char ch ; scanf ("%d%*c", &T) ; while (T--) { scanf ("%c %d%*c", &ch, &num) ; if (ch >= 'a' & 阅读全文
posted @ 2012-01-06 14:57 Seraph2012 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 01:27:17地址:http://acm.hdu.edu.cn/showproblem.php?pid=2090题意:中文。。mark:输入有点麻烦,用正则居然错了。。。直接用最暴力的方式a了。代码:# include <stdio.h>int main (){ double a, b, sum = 0 ; char s[100] ; while (~scanf ("%s%lf%lf", s, &a, &b)) sum += a*b ; printf ("%.1lf\n", sum) ; return 阅读全文
posted @ 2012-01-06 14:56 Seraph2012 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 01:34:16地址:http://acm.hdu.edu.cn/showproblem.php?pid=1021题意:fibonacci变种,f[0] = 7, f[1] = 11。问第n项是否能被3整除。mark:打表看规律,循环节为3,模8后为2或6的则为3的倍数。代码:# include <stdio.h>int main (){ int n ; while (~scanf ("%d", &n)) if (n%8 == 2 || n%8 == 6) puts ("yes") ; else puts (&q 阅读全文
posted @ 2012-01-06 14:56 Seraph2012 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 00:37:50地址:http://acm.hdu.edu.cn/showproblem.php?pid=2099题意:中文。。。不说了。代码:# include <stdio.h>int main (){ int i, n, m, flag ; while (~scanf ("%d%d", &n, &m) && (n||m)) { flag = 0 ; for (i = 0 ; i < 100 ; i++) if ((n*100+i) % m == 0) { ... 阅读全文
posted @ 2012-01-06 14:55 Seraph2012 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 00:29:10地址:http://acm.hdu.edu.cn/showproblem.php?pid=2070题意:求第n个fibonacci数。mark:注意long long。注意0(不知道有没有)代码:# include <stdio.h># include <math.h>long long dp[55] = {0, 1} ;int main (){ int i, n ; for (i = 2 ; i<= 50 ; i++) dp[i] = dp[i-1]+dp[i-2] ; while (~scanf ("%d&quo 阅读全文
posted @ 2012-01-06 14:54 Seraph2012 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 00:33:26地址:http://acm.hdu.edu.cn/showproblem.php?pid=2081题意:中文。。。不说了。代码:# include <stdio.h>char str[15] ;int main (){ int n ; scanf ("%d%*c", &n) ; while (gets(str)) printf ("6%s\n", str+6) ; return 0 ;} 阅读全文
posted @ 2012-01-06 14:54 Seraph2012 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 2011-12-15 00:13:24地址:http://acm.hdu.edu.cn/showproblem.php?pid=2052题意:绘图,绘制n*m的大方框,简单模拟。mark:PE一次,每组后面有空行。代码:# include <stdio.h># include <string.h># define REP(a,b) for(a = 0 ; a < b ; a++)char gp[100][100] ;int main (){ int i, n, m ; while (~scanf ("%d%d", &n, &m) 阅读全文
posted @ 2012-01-06 14:53 Seraph2012 阅读(177) 评论(0) 推荐(0) 编辑
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 51 下一页