摘要:
2011-12-12 03:53:00地址:http://acm.hdu.edu.cn/showproblem.php?pid=2006题意:中文题代码:# include <stdio.h>int main (){ int n, num, mul ; while (~scanf ("%d", &n)) { mul = 1 ; while (n--) { scanf ("%d", &num) ; if(num&1) mul*=num ; } printf ("%d... 阅读全文
摘要:
2011-12-12 03:41:00地址:http://acm.hdu.edu.cn/showproblem.php?pid=2004题意:中文。代码:# include <stdio.h>int main (){ int num ; char tab[] = "EEEEEEDCBAA" ; while (~scanf ("%d", &num)) { if (num < 0 || num > 100) puts ("Score is error!") ; else printf ("%c\n 阅读全文
摘要:
2011-12-12 03:35:42地址:http://acm.hdu.edu.cn/showproblem.php?pid=2002题意:中文题。思路:球体体积公式:V=4*Pi*r*r*r/3.0代码:# include <stdio.h>#define PI 3.1415927int main (){ double r ; while (~scanf ("%lf", &r)) printf ("%.3lf\n", 4*PI*r*r*r/3.0) ; return 0 ;} 阅读全文
摘要:
2011-12-12 03:38:15地址:http://acm.hdu.edu.cn/showproblem.php?pid=2003题意:中文题。代码:# include <stdio.h>int main (){ double a ; while (~scanf ("%lf", &a)) printf ("%.2lf\n", a>0?a:-a) ; return 0 ;} 阅读全文
摘要:
2011-12-12 03:30:57地址:http://acm.hdu.edu.cn/showproblem.php?pid=2001题意:中文题。代码:# include <stdio.h># include <math.h>int main (){ double x1, y1, x2, y2 ; while (~scanf ("%lf%lf%lf%lf", &x1, &y1, &x2, &y2)) printf ("%.2lf\n", sqrt ((x1-x2)*(x1-x2) + (y1-y 阅读全文
摘要:
2011-12-12 03:27:22地址:http://acm.hdu.edu.cn/showproblem.php?pid=1001题意:给出多组n,输出1+2+3...n的结果,并跟随一个空白行。代码:# include <stdio.h>int main (){ unsigned int n ; while (~scanf ("%d", &n)) printf ("%d\n\n", n*(n+1)/2) ; return 0 ;} 阅读全文
摘要:
2011-12-12 03:08:00链接:http://acm.hdu.edu.cn/showproblem.php?pid=1000题意:输入多组a和b,输出a+b的和并换行。代码:# include <stdio.h>int main (){ int a, b ; while (~scanf ("%d%d", &a, &b)) printf ("%d\n", a+b) ; return 0 ;} 阅读全文