This content is archived!

For the 2018-2019 school year, we have switched to using the WLMOJ judge for all MCPT related content. This is an archive of our old website and will not be updated.

Problem

Lily has decided that she needs to exercise and has started to lift weights. During her first week of exercising, she was capable of lifting some weight $A$. However, as she grew stronger, she was able to lift $B$ more kilograms than she could the week before. Figure out how much weight Lily was able to lift after $N$ weeks.

Input

The first line of input provides the number of test cases, $T (1 \leq T \leq 100)$. $T$ test cases follow. Each test case consists of one line containing three integers $A$, $B$, $N$ $(1 \leq A, B, N \leq 100)$.

Output

For each test case, your program should output one integer, how much she should be able to lift.

Explanation for Sample Output

In the second test case, she was able to lift $2$ kilograms in her first week, $5$ in her second, $8$ in her third, and $11$ in her fourth.

Editorial

Read only if you are stuck or have already solved the problem.