405358: GYM101915 C Shahhoud Training Hussain

Memory Limit:64 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

C. Shahhoud Training Hussaintime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output

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?

Input

The 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).

Output

For 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.

ExampleInput
3
2 1 3
4 1 10
3 2 1
Output
3
30
1

加入题单

算法标签: