405358: GYM101915 C Shahhoud Training Hussain
Description
Ever since coach Shahhoud started the series "Problem Every Day" . Hussain decided to train really hard. After all, he may get a chance to qualify for the upcoming SCPC contest !
Shahhoud gives Hussain K problems everyday. However, Hussain can solve at most P problems everyday.
At the end of the Nth day of training, Shahhoud wants to know how many problems did Hussain miss and hasn't solved yet?
InputThe first line contains an integer T, the number of test cases.
Each line of the following T lines describes a single test case. Each test case contains 3 space separated integers K, P, N (1 ≤ K, P, N ≤ 109).
OutputFor each test case print a single line, containing a single integer, denoting the number of problems Hussain has missed by the end of the Nth day.
ExampleInput3Output
2 1 3
4 1 10
3 2 1
3
30
1