UVA 10300: Ecological Premium

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=15&problem=1241&mosmsg=Submission+received+with+ID+8687675

题目大意:

      关于什么农场分钱,我先看看我的QQ农场,题目自己看吧~看起来是挺费劲的,简直是考英语阅读理解~

解题代码:

#include<iostream>
using namespace std;
int main(){
	int n;
	cin>>n;
	while(n--){
		int m,sum=0;
		cin>>m;
		while(m--){
			int a,b,c;
			cin>>a>>b>>c;
			sum+=a*c;
		}
		cout<<sum<<endl;
	}
	return 0;
}

扩展知识:http://qzone.qq.com/