您的位置:首页 > 其它

UVa 10300 - Ecological Premium

2013-02-25 17:49 267 查看
题目链接http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=24&problem=1241&mosmsg=Submission+received+with+ID+11339336

每个事件每一行的第一和第三相乘,总的相加即可

#include"stdio.h"
int main()
{
int apple,pea,orange,tomato,grape,potato;
scanf("%d",&apple);
while(apple--)
{
scanf("%d",&pea);
grape=0;
while(pea--)
{
scanf("%d%d%d",&orange,&tomato,&potato);
grape=grape+orange*potato;
}
printf("%d\n",grape);
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: