CF1992A.Only Pluses

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Only Pluses

Kmes has written three integers aa, bb and cc in order to remember that he has to give Noobish_Monk a×b×ca \times b \times c bananas.

Noobish_Monk has found these integers and decided to do the following at most 55 times:

  • pick one of these integers;
  • increase it by 11.

For example, if a=2a = 2, b=3b = 3 and c=4c = 4, then one can increase aa three times by one and increase bb two times. After that a=5a = 5, b=5b = 5, c=4c = 4. Then the total number of bananas will be 5×5×4=1005 \times 5 \times 4 = 100.

What is the maximum value of a×b×ca \times b \times c Noobish_Monk can achieve with these operations?

Input

Each test contains multiple test cases. The first line of input contains a single integer tt (1≤t≤10001 \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 aa, bb and cc (1≤a,b,c≤101 \le a, b, c \le 10) — Kmes's integers.

Output

For each test case, output a single integer — the maximum amount of bananas Noobish_Monk can get.

Samples

2
2 3 4
10 1 10
100
600

在线编程 IDE

建议全屏模式获得最佳体验