There are n people participating in some contest, they start participating in x minutes intervals. That means the first participant starts at time 0, the second participant starts at time x, the third — at time 2 ⋅ x, and so on.

Duration of contest is t minutes for each participant, so the first participant finishes the contest at time t, the second — at time t + x, and so on. When a participant finishes the contest, their dissatisfaction equals to the number of participants that started the contest (or starting it now), but haven't yet finished it.

Determine the sum of dissatisfaction of all participants.

Input

The first line contains a single integer k (1 ≤ k ≤ 1000) — the number of test cases.

Each of the next k lines contains three integers n, x, t (1 ≤ n, x, t ≤ 2 ⋅ 10^9) — the number of participants, the start interval and the contest duration.

Output

Print k lines, in the i-th line print the total dissatisfaction of participants in the i-th test case.

Example

Input


4
4 2 5
3 1 2
3 3 10
2000000000 1 2000000000


Output


5
3
3
1999999999000000000

Note

In the first example the first participant starts at 0 and finishes at time 5. By that time the second and the third participants start, so the dissatisfaction of the first participant is 2. 

The second participant starts at time 2 and finishes at time 7. By that time the third the fourth participants start, so the dissatisfaction of the second participant is 2. 

The third participant starts at 4 and finishes at 9. By that time the fourth participant starts, so the dissatisfaction of the third participant is 1.

The fourth participant starts at 6 and finishes at 11. By time 11 everyone finishes the contest, so the dissatisfaction of the fourth participant is 0.

In the second example the first participant starts at 0 and finishes at time 2. By that time the second participants starts, and the third starts at exactly time 2. So the dissatisfaction of the first participant is 2. 

The second participant starts at time 1 and finishes at time 3. At that time the third participant is solving the contest.
//********************(Writer-Aagam)*******************************
//*******************(User-getlost01)******************************

import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.BigInteger;

//------------------------Main_class-------------------------------

public class Codechef
{
static AagamReader ar=new AagamReader();
   
//----------------------Main_Function------------------------------

public static void main (String[] args) throws java.lang.Exception
{
// long start=System.currentTimeMillis();

int k=ar.nextInt();
while(k-->0)
{
long n=ar.nextInt();
long x=ar.nextInt();
long t=ar.nextInt();
long p=t/x;
long out=0;
if(n<=p+1)
out=(n*(n-1))/2;
else
out=(n-p)*p+p*(p-1)/2;

System.out.println(out);
}
// long end=System.currentTimeMillis();
// System.out.println(end-start+" Millisec");
}

//--------------------Solving_Function---------------------------

static void solve(String s)
{


System.out.println(s);
}
//------------------------Reverse----------------------------------

public static int[] reverses(int data[], int left, int right)
{
while (left < right) 
{
int temp = data[left];
data[left++] = data[right];
data[right--] = temp;
}
return data;
}

//----------------------------Swap-----------------------------------

public static int[] swap(int data[], int left, int right) 
{
int temp = data[left];
data[left] = data[right];
data[right] = temp;
return data;
}

//--------------------------Factorial---------------------------------

public static long factorials(long n)
{
if(n==0) return 1; 

return n*factorials(n-1);
}

//-------------------------G.C.D---------------------------------------

public static long gcd(long a,long b)
{
if(b==0) return a;

return gcd(b,a%b);
}

//-------------------------ModularG.C.D-------------------------------

static long gcd(long a,long b,long n,long mod)
{
if(a==b)
return (mod_expo(a,n,mod)+mod_expo(b,n,mod))%mod;

long c=1;long diff=a-b;

for(long i=1;i<=Math.sqrt(diff);i++)
{
if(diff%i==0)
{
long temp=(mod_expo(a,n,i)+mod_expo(b,n,i))%i;
if(temp==0)
c=Math.max(c,i);

temp=(mod_expo(a,n,diff/i)+mod_expo(b,n,diff/i))%(diff/i);
if(temp==0)
c=Math.max(c,diff/i);
}
}
return c%mod;
}

//------------------------ l.C.M--------------------------------------
public static long lcm(long a,long b)
{
return (a*b)/gcd(a,b);
}
//---------------------------Prime-----------------------------------

public static boolean[] seive(int n)
{
boolean isPrime[]=new boolean[n+1];
Arrays.fill(isPrime,true);
isPrime[0]=false;
isPrime[1]=false;
for(int i=2;i*i<=n;i++)
{
for(int j=2*i;j<=n;j+=i)
{
isPrime[j]=false;
}
}
return isPrime;
}

//----------------------Modular_Exponentiation-------------------------

static long mod_expo(long a,long b,long n)
{
long res=1;
while(b>0)
{
if((b&1)!=0)
{res=(res*a%n)%n;}

a=(a%n*a%n)%n;
b=b>>1;
}
return res;
}

//-------------------------Power-----------------------------------------

static int fastpower(int a,int b)
{
int res=1;
while(b>0)
{
if((b&1)!=0)
res=res*a;

a=a*a;
b=b>>1;
}
return res;
}

//---------------------Modular_Arithmetic---------------------------------

public long modularSubtraction(long a,long b,long MOD)    // Modular Subtraction
{ return (a%MOD-b%MOD+MOD)%MOD; }

public long modularMultiplication(long a,long b,long MOD) // Modular Multiplication
{ return ((a%MOD)*(b%MOD))%MOD; }

public long modularAddition(long a,long b,long MOD)       // Modular Addition
{ return (a%MOD+b%MOD)%MOD; }	

//-----------------------Binary_Searching-----------------------------------

public static int binarySearch(int arr[], int first, int last, int num)
{
int mid = (first + last) / 2;
while (first <= last)
{
if (arr[mid] < num) {first = mid + 1;} 
else if (arr[mid] == num) {return mid;}
else {last = mid - 1;}
mid = (first + last) / 2;
}
return -1;
}

//-------------------------------------Node-------------------------------- 

static class Node<E>             
{
protected E data;
protected Node link;  //link====>next/linked address

public Node() {data=null; link=null;}

public Node(E d,Node n) {data=d; link=n;}  

public void setLink(Node n) {link=n;}

public void setData(E d) {data=d;}

public Node getLink() {return link;}

public E getData() {return data;}
}

//--------------------------------------Aaagmlist-----------------------------

static class aagamList<E>
{
protected Node start;
protected Node end;
public int size;

public aagamList() {start=null;end=null;size=0;}

public boolean isEmpty() {return start==null;}

public int size() {return size;}

public E get(int pos)
{ Node<E> curr=start; int c=0;
  while(curr!=null) {if(c==pos) return curr.data; c++; curr=curr.link;}
  return null;}

public void push_lr(E val) { Node<E> cnode=new Node<>(val,null); cnode.link=start; start=cnode;}

public void prepend(E val)
{ Node<E> cnode=new Node<E>(val,null); size++;
  if(start==null) {start=cnode;end=start;} 
  else {cnode.setLink(start);start=cnode;}
}

public void append(E val)
{ Node<E> cnode=new Node<E>(val,null); size++;
  if(start==null) {start=cnode;end=start;} 
  else {end.setLink(cnode);end=cnode;}
}

public void insert(E val,int pos)
{ Node<E> cnode=new Node<>(val,null); Node temp=start; --pos;
  for(int i=1;i<size;i++)
  { if(i==pos) {Node tmp=temp.getLink(); temp.setLink(cnode); cnode.setLink(tmp); break;}
    temp=temp.getLink(); } size++;
}

public void remove(int pos)
{ if(pos==1) {start=start.getLink(); size--; return;}
  if(pos==size) {Node s=start; Node t=start; while(s!=end) {t=s; s=s.getLink();}
  end=t; end.setLink(null); size--; return;}
  Node temp=start; --pos;
  for(int i=0;i<size-1;i++) 
  { if(i==pos) {Node tmp=temp.getLink(); tmp=tmp.getLink(); temp.setLink(tmp); break;}
  temp=temp.getLink(); }size--; 
}

public void display()
{ if(size==0) {System.out.println(" "); return;}
  if(start.getLink()==null) {System.out.println(start.getData()); return;}
  Node<E> temp=start; System.out.print(temp.getData()+" ");
  temp=start.getLink();
  while(temp.getLink()!=null) {System.out.print(temp.getData()+" "); temp=temp.getLink();}
  System.out.print(temp.getData()+"\n");
}
}

//----------------------------------------Stack------------------------------

static class Astack<E>
{
aagamList<E> a=new aagamList<>();
public void push(E val) {a.append(val); return;}
public void pop() {a.remove(a.size()-1); return;}
public void display() {a.display(); return;}
}

//---------------------------------------Dequeue------------------------------

static class Adequeue<E>
{
aagamList<E> a=new aagamList<>();
public void push_f(E val) {a.prepend(val); return;}
public void push_b(E val) {a.append(val); return;}
public void pop_f() {a.remove(0); return;}
public void pop_b() {a.remove(a.size()-1); return;}
public void display() {a.display(); return;}
}

//-----------------------AagamReader_class------------------------------------

public static class AagamReader 
{
BufferedReader br;
StringTokenizer st;

public AagamReader()
{
br = new BufferedReader(new InputStreamReader(System.in));
}

String next()                                           //ReadNextToken
{
while (st == null || !st.hasMoreElements()) 
{
try 
{
st = new StringTokenizer(br.readLine());
}
catch (IOException e) {e.printStackTrace();}
}
return st.nextToken();
}

int nextInt() { return Integer.parseInt(next()); }        //ReadInt

long nextLong() { return Long.parseLong(next()); }        //ReadLong

double nextDouble() { return Double.parseDouble(next());} //ReadDouble

int[] get_arr(int n)                                      //ReadArray
{
int arr[]=new int [n];
for(int i=0;i<n;i++)
arr[i]= Integer.parseInt(next());
return arr;
}

String nextLine()                                         //Readline
{
String str = "";
try 
{ 
str = br.readLine(); 
}
catch (IOException e) 
{
e.printStackTrace();
}
return str;
}
}
}
//=>->->->-->->->-[>>>>>>ENDING_WITH_HAPPY_CODING<<<<<<]-<-<-<-<-<-<-<-<-<-<=

