题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2090
题解:
注意输出格式
AC代码:
#include <string>
#include <iostream>
using namespace std;
int main(){
string seeds;
double amount, price;
double ans = 0;
while (cin >> seeds >> amount >> price) {
ans += amount * price;
}
printf("%.1f\n", ans);
return 0;
}