[恢]hdu 2090

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 0 ;
}



posted @ 2012-01-06 14:56  Seraph2012  阅读(193)  评论(0编辑  收藏  举报