#include <iostream>
#define int long long
using namespace std;

signed main()
{
     int t;
     cin>>t;
     while(t--)
     {
         int n,x,k;
         cin>>n>>x>>k;
         int p=min(n-1,k/x);
         int ans=p*(n-p);
         ans+=((p-1)*p)/2;
         cout<<ans<<endl;
     }
    return 0;
}
