[恢]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 ;
}



原文地址:https://www.cnblogs.com/lzsz1212/p/2314606.html