P21556 [HackerEarth] Prayatna decoration work is going on at full swing. In order to decorate the MIT road, Don has an infinite supply of streamers of length m. However, he found out that the distance betwee
普及
题目描述

Prayatna decoration work is going on at full swing. In order to decorate the MIT road, Don has an infinite supply of streamers of length m. However, he found out that the distance between two consecutive poles is k, and that (n+1) poles are present, and hence n streamers of length k are required to decorate.

Don plans on cutting the streamers and joining them with glue, so that he gets the required streamers of the required length. Find the minimum number of cuts required.

Input
The first line of the input contains ite, the number of test cases.
Then, ite lines follow, each containing 3 numbers, k, n, m

Output
Print ite lines, each containing the answer.

Input Constraints
1 ≤ ite ≤ 1000
1 ≤ n,m,k ≤ 1000

SAMPLE INPUT
2
5 4 4
6 100 3

SAMPLE OUTPUT
3
0

输入格式

见题面

输出格式

见题面

样例输入
95 5 4 4 6 100 3 500 5 1000 314 159 26 1 1 1 1 1 1000 1 1000 1 1 1000 1000 1000 1 1 1000 1 1000 1000 1000 1 1000 1000 1000 778 887 384 336 794 916 650 493 387 28 363 422 764 60 691 427 541 927 212 737 173 430 568 369 863 531 783 136 68 124 23 803 930 168 70 59 12 457 394 374 230 43 785 920 422 325 199 538 414 371 316 981 92 527 863 874 957 282 997 171 926 926 85 337 337 506 730 730 314 125 125 896 546 546 815 435 435 365 751 751 88 277 277 179 789 404 404 652 400 400 933 677 677 369 13 13 227 95 95 540 571 571 435 468 468 602 903 903 318 493 318 757 302 757 287 442 287 690 445 690 441 730 441 118 98 118 482 676 482 928 568 928 498 498 498 354 354 354 587 587 587 966 966 966 307 307 307 3 4 2 2 3 3 978 999 121 2 10 5 7 9 9 5 7 7 2 7 5 3 8 8 3 5 8 12 6 5 3 10 10 314 154 27 6 3 4 3 1000 1000 3 60 40 4 13 26 31 511 17 315 159 26 7 3 15 24 159 29 20 3 12 48 1000 500 3 100 4 999 782 567 4 5 5 10 1 3 400 5 1000 10 6 6 4 3 6 153 586 77 4 6 6 998 999 1000 4 10 5 987 453 566
样例输出
3 0 3 147 0 1 0 999 0 0 0 0 883 791 492 362 60 541 733 567 531 66 803 69 455 225 918 199 369 92 874 980 916 337 726 125 546 430 743 276 403 396 676 12 94 570 465 602 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 991 8 8 6 6 7 5 5 9 149 2 999 59 12 481 153 3 154 2 992 75 745 4 1 4 4 2 579 4 998 8 453