Electricity Bill
Limits: 2 sec., 512 MiB
Zenyk and Marichka got their electricity bill and want to check how much they owe.
At the beginning of the month the electricity meter showed \(a\) kilowatt-hours, and at the end of the month it showed \(b\) kilowatt-hours. Each kilowatt-hour used costs \(x\) hryvnias.
Help Zenyk and Marichka find out how many hryvnias they have to pay for the electricity used during the month.
Input
The only line contains three integers \(a\), \(b\) and \(x\) – the meter readings at the beginning and at the end of the month in kilowatt-hours, and the price of one kilowatt-hour in hryvnias, respectively.
Output
Print one integer – the amount in hryvnias to pay for the electricity used during the month.
Constraints
\(0 \le a \le b \le 10^6\),
\(1 \le x \le 100\).
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| 123 150 4 | 108 |
| Input (stdin) | Output (stdout) |
|---|---|
| 500 500 7 | 0 |
| Input (stdin) | Output (stdout) |
|---|---|
| 0 12 10 | 120 |
Notes
In the first example, 27 kilowatt-hours were used during the month, 4 hryvnias each, so they have to pay 108 hryvnias.
In the second example, the meter reading did not change, so there is nothing to pay for electricity.
Submit a solution
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|