https://codeforces.com/problemset/problem/1539/A
详细题解
#include<bits/stdc++.h>
using namespace std;
typedef long long int LL;
int main(void)
{
LL t; cin>>t;
while(t--)
{
LL n,x,t; cin>>n>>x>>t;
if(n*x<=t) cout<<n*(n-1)/2<<endl;
else
{
LL cnt=t/x;
LL num=n-cnt;
cout<<num*cnt+cnt*(cnt-1)/2<<endl;
}
}
return 0;
}