Problem list
Log in
#r03323 · Online Judge > GoldOJ

Money Shortfall

Bronze IV 1.0 s 256 MB

An item costs $p$ each; you want to buy $c$ of them and have $m$ money. Print how much money is missing to buy them all, or $0$ if you have enough.

Input

Three integers $p$, $c$, $m$ ($1 \le p, c \le 10^6$, $0 \le m \le 10^{12}$).

Output

Print the shortfall (0 if none).

Example 1

Input
800 3 2000
Output
400
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code