题目链接:Ecological PremiumVA - 10300
#include <iostream>
#include <cstdio>
using namespace std;
typedef long long LL;
int main()
{
int n;
scanf("%d",&n);
while(n--)
{
int f,squ,ani,env;
LL sum=0;
scanf("%d",&f);
while(f--)
{
scanf("%d%d%d",&squ,&ani,&env);
sum+=squ*env;
}
printf("%lld\n",sum);
}
return 0;
}