hdu 2090 算菜价

来源:互联网 发布:万网域名隐藏whois 编辑:程序博客网 时间:2024/04/30 19:19

http://acm.hdu.edu.cn/showproblem.php?pid=2090

这道题真邪乎,编译错误好几次,杭电的编译器和我的不一样啊啊啊~~~~囧死了

无语。。。。。看了别人的代码才AC的,破题

#include <stdio.h>int main(){char s[100];double n,price,sum=0.0;while(scanf("%s%lf%lf",s,&n,&price)!=EOF){sum+=n*price;}printf("%.1lf\n",sum);return 0;}