#include<cstdio>
#include<cmath>
#include<iostream>
using namespace std;
int main()
{
long long test, farmer, sum;
double ans, final, a, b, c;
scanf("%lld", &test);
while(test--)
{
scanf("%lld", &farmer);
sum=0;
while(farmer--)
{
scanf("%lf%lf%lf", &a, &b, &c);
ans = (a/b);
final =(ans*b*c);
sum=sum+final;
}
printf("%lld\n", sum);
}
return 0;
}
No comments:
Post a Comment