#include <bits/stdc++.h>
#define ll long long int
using namespace std;
void mainSolve()
{
int x, y, z;
cin >> x >> y >> z;
if (y >= z)
{
cout << 0 << endl;
return;
}
z -= y;
int ans = z / x;
cout << ans << endl;
}
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int t;
cin >> t;
while (t--)
{
mainSolve();
}
return 0;
}