P17591 [CodeChef] SOLBLTY
普及-
题目描述

Read problem statements in [Bengali], [Mandarin Chinese], [Russian], and [Vietnamese] as well.

Suppose for a unit rise in temperature, the solubility of sugar in water increases by $B \frac{\mathrm{g}}{100\ \mathrm{mL}}$.

Chef does an experiment to check how much sugar (in $\mathrm{g}$) he can dissolve given that he initially has $1$ liter of water at $X$ degrees and the solubility of sugar at this temperature is $A \frac{\mathrm{g}}{100\ \mathrm{mL}}$. Also, Chef doesn't want to lose any water so he can increase the temperature to at most $100$ degrees.

Assuming no loss of water takes place during the process, find the maximum amount of sugar (in $\mathrm{g}$) can be dissolved in $1$ liter of water under the given conditions.

------ Input ------

The first line contains an integer $T$, the number of test cases. Then the test cases follow.
The only line of each test case contains three integers $X, A, B$.

------ Output ------
For each testcase, output in a single line the answer to the problem.

------ Constraints ------
$1 ≤ T ≤ 1000$
$31 ≤ X ≤ 40$
$101 ≤ A ≤ 120$
$1 ≤ B ≤ 5$

------ Subtasks ------
Subtask #1 (100 points): Original Constraints

----- Sample Input 1 ------
3

40 120 1

35 120 2

40 115 3
----- Sample Output 1 ------
1800

2500

2950
----- explanation 1 ------
Test Case $1$: Since solubility is increasing with temperature, the maximum solubility will be at $100$ degrees which is equal to $120 + (100 - 40) = 180 \frac{\mathrm{g}}{100\ \mathrm{mL}}$.

So for $1$ liter of water the value is $180 \cdot 10 = 1800\ \mathrm{g}$.

Test Case $2$: Since solubility is increasing with temperature, the maximum solubility will be at $100$ degrees which is equal to $120 + (100 - 35) \cdot 2 = 250\frac{\mathrm{g}}{100\ \mathrm{mL}}$.

So for $1$ liter of water the value is $250 \cdot 10 = 2500\ \mathrm{g}$.

输入格式

见题面

输出格式

见题面

样例输入
3 40 120 1 35 120 2 40 115 3
样例输出
1800 2500 2950