#include<bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
	ll cas,n,x,t,i,j,k;
	scanf("%lld",&cas);
	while(cas--) {
		scanf("%lld %lld %lld",&n,&x,&t);
		ll sum=0,en=t,cnt;
		if(en>=(n-1)*x) {
			sum+=(n-1)*n/2;
		} else {
			en=en/x*x;
			cnt=((n-1)*x-en)/x+1;
			sum+=cnt*(n-cnt);
			sum+=(n-1-cnt)*(n-cnt)/2;
		}
		printf("%lld\n",sum);
	}
	return 0;
}