#include<iostream>
#include<iomanip>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
long double a,b,c,d,e,f;
cin>>a;
for(int x=1;x<=a;x++){
cin>>b;
f=0;
for(int y=1;y<=b;y++){
cin>>c>>d>>e;
f=f+(((c/d)*e)*d);
}
cout<<f<<endl;
}
system("pause");
return 0;
}
沒有留言:
張貼留言