#include <bits/stdc++.h>

using namespace std;

int main()
{
    int k;cin>>k;
    long long n,t,x;
    while(k--)
        {cin>>n>>x>>t;
        t/=x;
        if(t>n)
            {n*=(n-1);
            n/=2;}
        else
            {n-=t;
            n*=t;
            n+=((t-1)*t)/2;}
        cout<<n<<endl;}
    return 0;
}
