P10862 [HBCPC2024] Spicy or Grilled?
Description
Since a regular programming contest lasts for five hours, it's a big problem to prepare contestants' food during the contest.

In the 20XX International Collegiate Programming Contest in Hubei Province, China, there were $n$ contestants participating in the contest. The host wanted to prepare a Spicy Chicken Burger Set for every contestant, which was $a$ dollars per set at that time. But since there were some people who could not bear the spiciness like Walk Alone, a Grilled Chicken Burger Set was prepared for these people, which was $b$ dollars per set. Before the contest, the host had collected the number $x$ of people who wanted to eat a Grilled Chicken Burger Set.
But Walk Alone was too stupid and lazy to calculate how much the host would spend. Please help him to calculate.
Input Format
In the first line,there is an integer $T$ ($1 \leq T \leq 10^4$) denoting the number of test cases.
For each test case, there are four integers $n$, $x$, $a$ and $b$ ($1 \leq n, a, b \leq 10^4, 0 \le x \le n$) in each line, representing the number of contestants in total, the number of contestants who want Grilled Chicken Burger Set, the price of Spicy Chicken Burger Set and Grilled Chicken Burger Set per set.
Output Format
For each test case, output a single integer denoting the total money the host would spend.
Explanation/Hint
In the first test case, there were $400$ people chosen the Spicy Chicken Burger Set and $200$ people chosen the Grilled one. So the total money is $400 \times 27 + 200 \times 26 = 16\ 000$ dollars.