HDU 2090 算菜价 --- 水题

HDU 2090 算菜价

/* HDU 2090 算菜价 --- 水题 */
#include <cstdio>

int main()
{
    char s[105];
    double a, b, sum = 0;

    while (scanf("%s", s)==1){
        scanf("%lf%lf", &a, &b);
        a *= b;
        sum += a;
    }
    printf("%.1f\n", sum);

    return 0;
}
View Code

 

posted @ 2015-12-22 02:46  tan90丶  阅读(212)  评论(0编辑  收藏  举报