/***
**      Bismillahir Rahmanir Rahim                
**              ALLAHU AKBAR
**
**     Author: Khairul Anam Mubin (__Broly__)
**     Bangladesh University of Business and Technology,
**     Dept. of CSE.
***/
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
  
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    
    int tc; cin >> tc;
    while (tc--) {
        int n , w , m;
        cin >> n >> w >> m;
        int need = m / w;
        if (m % w) need++;
        int ans = 0;
        if (need > n + 1) {
            ans = need - (n + 1);
        }
        cout << ans << "\n";
    }
    return 0;
}