int main(void)
{
int caseNum, farmNum, i, j;
double area, animal, degree, budget;
scanf("%d", &caseNum);
for (i=0;i<caseNum;i++)
{
scanf("%d", &farmNum);
budget = 0;
for (j=0;j<farmNum;j++)
{
scanf("%lf%lf%lf", &area, &animal, °ree);
budget += area*degree;
}
printf("%.0f\n", budget);
}
return 0;
}
p10300題目連結
回ACM題庫目錄
回首頁
沒有留言:
張貼留言