P11019 [HackerEarth] tom and coins
普及
题目描述

Problem Statement:

Tom is collecting money for his birthday party, he is having 'a' coins today and his father gives him 'k' coins each day.

Since his birthday is on 'nth' day, he wants to know the amount of money he will have on his birthday.

Tom is weak at maths, help him calculate the number of coins he will have on his birthday.

Input:

The first line of input contains an integer 'T' denoting the number of test cases.
Each line of test case contains 3 space seperated integers 'a', 'k', 'n' .

Output:

For each test case, output the number of coins Tom will have on his birthday.

Constraints:

1 ≤ T ≤ 100

1 ≤ a,n ≤ 100

0 ≤ k ≤ 100

SAMPLE INPUT
3
2 2 3
1 2 3
1 0 3

SAMPLE OUTPUT
6
5
1

Explanation

In test case 1, a=2, k=2 and n=3. since today he has 2 coins and his father gives him 2 coins each day, on the 3rd day he will have 2+2+2=6 coins

输入格式

见题面

输出格式

见题面

样例输入
3 2 2 3 1 2 3 1 0 3 SAMPLE
样例输出
6 5 1