# TCKTFINE - Editorial

Author: Aatman Supkar
Testers: Jeevan Jyot Singh, Hriday
Editorialist: Nishank Suresh

373

None

# PROBLEM:

P passengers are traveling on a train, and they have Q tickets between them. Each person can have 0 or 1 ticket.

Each person without a ticket pays a fine of rupees X. How much will be paid in fines?

# EXPLANATION

Of the P passengers, P - Q do not have a ticket. Each of them will pay X, so a total of (P-Q)\cdot X will be collected.

# TIME COMPLEXITY

\mathcal{O}(1) per test case.

# CODE:

Editorialist's code (Python)
for _ in range(int(input())):
x, p, q = map(int, input().split())
print(x*(p-q))