#include<stdio.h>
int main()
{
double a,b,sum=0;
char str[20];
while(scanf("%s%lf%lf",str,&a,&b)!=EOF)
{
sum+=a*b;
}
printf("%0.1lf\n",sum);
return 0;
}
hdu 2090 算菜价
最新推荐文章于 2021-09-28 15:16:24 发布
#include<stdio.h>
int main()
{
double a,b,sum=0;
char str[20];
while(scanf("%s%lf%lf",str,&a,&b)!=EOF)
{
sum+=a*b;
}
printf("%0.1lf\n",sum);
return 0;
}