-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ecological premium.cpp
41 lines (21 loc) · 1021 Bytes
/
Ecological premium.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include<stdio.h>
int main()
{
int i,testcase,sum;
int numOfFarmer,sizeOfFarm,numOfAnimal,friendliness;
while(scanf("%d", &testcase) != EOF)
{
while(testcase--)
{
sum=0;
scanf("%d", &numOfFarmer);
for(i=1;i<=numOfFarmer;i++)
{
scanf("%d %d %d", &sizeOfFarm, &numOfAnimal, &friendliness);
sum+=(sizeOfFarm*friendliness);
}
printf("%d\n", sum);
}
}
return 0; 0;
}