### My issue

Input Format

The first line contains a single integer

�

T — the number of test cases. Then the test cases follow.

The first and only line of each test case contains three integers

�

X,

�

Y and

�

Z — the number of 5 rupee coins, the number of 10 rupee coins and the cost of each chocolate.

Output Format

For each test case, output the maximum number of chocolates that Chef can buy for Chefina.

Constraints

1

≤

�

≤

100

1≤T≤100

1

≤

�

,

�

,

�

≤

1000

1≤X,Y,Z≤1000

Sample 1:

Input

Output

4

10 10 10

3 1 8

8 1 3

4 4 1000

15

3

16

0

### My code

```
#include <stdio.h>
int main(void) {
// your code goes here
int t;
scanf("%d",&t);
while(t--)
{
int x,y,z;
scanf("%d %d %d", &x, &y, &z);
printf("%d\n", x*z+y*z/2);
}
return 0;
}
```

Learning course: Basic Math using C

Problem Link: CodeChef: Practical coding for everyone