# Sweet Earnings at Codedamn

At Codedamn's candy lab, there's a total of $100$ chocolates available for sale.

Each day, the goal is to sell $X$ chocolates, with a reward of $1$ rupee for every chocolate sold up to the goal. For any chocolates sold beyond this daily target, the reward doubles to $2$ rupees for each **additional** chocolate.

Given that $Y$ chocolates are sold in a particular day, your task is to calculate the total earnings of the day.

## Format for input

- The first line will contain a single integer $T$, representing the number of test cases.
- For each test case, there will be two space-separated integers $X$ and $Y$ — the daily sales target, and the actual number of chocolates sold.

## Format for output

For every test case, print on a new line the total earnings for that day.

## Constraints

- $1 \leq T \leq 100$
- $1 \leq X, Y \leq 10$

## Sample Test Cases (and explanation)

### Case #1:

Input:

`4 3 1 5 5 4 7 2 3`

Output:

`1 5 10 4`

#### Explanation

**Test case $1$:** The daily sales target was $3$. Only $1$ chocolate was sold, earning $1$ rupee.

**Test case $2$:** The daily sales target was $5$. With $5$ chocolates sold, the total earnings were $5$ rupees.

**Test case $3$:** The daily sales target was $4$. Selling $7$ chocolates led to earnings of $4$ rupees for the first $4$ chocolates and an additional $2$ rupees per chocolate for the extra $3$ chocolates, making a total of $10$ rupees.

**Test case $4$:** The daily sales target was $2$. Selling $3$ chocolates resulted in earnings of $2$ rupees for the first $2$ chocolates and an additional $2$ rupees for the extra chocolate, totaling $4$ rupees.