File size: 1,032 Bytes
e0b2090 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Kmes has written three integers $a$, $b$ and $c$ in order to remember that he has to give Noobish_Monk $a \times b \times c$ bananas. Noobish_Monk has found these integers and decided to do the following at most $5$ times: * pick one of these integers; * increase it by $1$. For example, if $a = 2$, $b = 3$ and $c = 4$, then one can increase $a$ three times by one and increase $b$ two times. After that $a = 5$, $b = 5$, $c = 4$. Then the total number of bananas will be $5 \times 5 \times 4 = 100$. What is the maximum value of $a \times b \times c$ Noobish_Monk can achieve with these operations? Each test contains multiple test cases. The first line of input contains a single integer $t$ ($1 \le t \le 1000$) — the number of test cases. The description of the test cases follows. The first and only line of each test case contains three integers $a$, $b$ and $c$ ($1 \le a, b, c \le 10$) — Kmes's integers. For each test case, output a single integer — the maximum amount of bananas Noobish_Monk can get. |