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.
/*
TO LEARN
1-segment trees
2-euler tour
3-fenwick tree and interval tree
*/
            import java.util.*;
		    import java.math.*;
		    import java.io.*; 
		    import java.util.stream.Collectors;
 
		     public class A{
		     
		    static FastReader scan=new FastReader();
		     public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static long gcd(long a,long b)
	{
		if(b==0)
			return a;
		return gcd(b,a%b);
	}
	static BigInteger lcm(BigInteger a,BigInteger b){
		return ((a.multiply(b)).divide(a.gcd(b)));
	}
		    public static void main(String[] args)  throws Exception 
		    {
	
		    //scan=new FastReader("vs.txt");
		    //out = new PrintWriter("hps.out");
		 
		 /*
		 currently doing 
		 1-digit dp
		 2-ds like fenwick and interval tree

		 */

		    int tt=1;
/*
if(t<x)
ans=0;
if(t==x)
ans=n;
if(t>=n*x-x)
ans=(n*(n-1)/2);
*/
/*
6
1-2,3,4
2-3,4,5
3-4,5,6
4-5,6
5-6
*/
tt=scan.nextInt();
	 outer:while(tt-->0)
		    {

		    	long n=scan.nextLong(),x=scan.nextLong(),t=scan.nextLong();
		    	
		    	if(t<x)
		    	{
		    		out.println(0);
		    		continue outer;
		    	}
		    	if(t==x)
		    	{
		    		out.println(n-1);
		    		continue outer;
		    	}
if(t>=n*x-x){

out.println(n*(n-1)/2);
continue outer;
}
		    	if(t%x==0)
		    	{
		    		long between=t/x;
		    		long k=n-between-1;
		    		long k2=n-(n-between+1);
		    		long res=k2*(k2+1)/2;
		    		res+=(between*(n-between));
		    		out.println(res);
		    	}
		    	else 
		    	{
		    		long between=t/x;
		    		long k=n-between-1;
		    		long k2=n-(n-between+1);
		    		long res=k2*(k2+1)/2;
		    		//out.println(n-between);
		    		res+=(between*(n-between));
		    		out.println(res);

		    	}


		    }



		  	    out.close();
		    }
		    static class special implements Comparable<special>{
		        int x,y;
		        String s;
		        special(int x,int y,String s)
		        {
		            this.x=x;
		           this.y=y;
		           this.s=s;
		        }
		     
		     @Override
		            public boolean equals(Object o){
		                if (o == this) return true;
		                if (o.getClass() != getClass()) return false;
		                special t = (special)o;
		                return t.x == x && t.y == y&&t.s.equals(s);
		            }
		     
		    public int compareTo(special o)
		    {
		        return Integer.compare(x,o.x);
		    }
		    }
		    static long binexp(long a,long n)
		    {
		        if(n==0)
		            return 1;
		        long res=binexp(a,n/2);
		        if(n%2==1)
		            return res*res*a;
		        else 
		            return res*res;
		    }
		     
		    static long powMod(long base, long exp, long mod) {
		           if (base == 0 || base == 1) return base;
		           if (exp == 0) return 1;
		           if (exp == 1) return (base % mod+mod)%mod;
		           long R = (powMod(base, exp/2, mod) % mod+mod)%mod;
		           R *= R;
		           R %= mod;
		           if ((exp & 1) == 1) {
		               return (base * R % mod+mod)%mod;
		           }
		           else return (R %mod+mod)%mod;
		       }
		    static double dis(double x1,double y1,double x2,double y2)
		    {
		        return Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		    }
		    static long mod(long x,long y)
		        {
		            if(x<0)
		                x=x+(-x/y+1)*y;
		            return x%y;
		        }
		     public static  long pow(long b, long e) {
		                long r = 1;
		                while (e > 0) {
		                    if (e % 2 == 1) r = r * b ;
		                    b = b * b;
		                    e >>= 1;
		                }
		                return r;
		            }
		    private static void sort(long[] arr) {
		            List<Long> list = new ArrayList<>();
		            for (long object : arr) list.add(object);
		            Collections.sort(list);
		        //Collections.reverse(list);
		            for (int i = 0; i < list.size(); ++i) arr[i] = list.get(i);
		        }
		    private static void sort2(int[] arr) {
		            List<Integer> list = new ArrayList<>();
		            for (int object : arr) list.add(object);
		            Collections.sort(list);
		        Collections.reverse(list);
		            for (int i = 0; i < list.size(); ++i) arr[i] = list.get(i);
		        }
		     public static class FastReader {
		            BufferedReader br;
		            StringTokenizer root;
		            
		     
		            public FastReader() {
		                br = new BufferedReader(new InputStreamReader(System.in));
		            }
		            FastReader(String filename)throws Exception
		            {
		     
		                br=new BufferedReader(new FileReader(filename));
		            }
		     
		            boolean hasNext(){
		                String line;
		                while(root.hasMoreTokens())
		                    return true;
		                return false;
		            }
		     
		            String next() {
		                while (root == null || !root.hasMoreTokens()) {
		                    try {
		                        root = new StringTokenizer(br.readLine());
		                    } catch (Exception addd) {
		                        addd.printStackTrace();
		                    }
		                }
		                return root.nextToken();
		            }
		     
		            int nextInt() {
		                return Integer.parseInt(next());
		            }
		     
		            double nextDouble() {
		                return Double.parseDouble(next());
		            }
		     
		            long nextLong() {
		                return Long.parseLong(next());
		            }
		     
		            String nextLine() {
		                String str = "";
		                try {
		                    str = br.readLine();
		                } catch (Exception addd) {
		                    addd.printStackTrace();
		                }
		                return str;
		            }
		             public int[] nextIntArray(int arraySize) {
		                int array[] = new int[arraySize];
		     
		                for (int i = 0; i < arraySize; i++) {
		                    array[i] = nextInt();
		                }
		     
		                return array;
		            }
		    }
		     static class Pair implements Comparable<Pair>{
		            public long x, y,z;
		            public Pair(long x1, long y1,long z1) {
		                x=x1;
		                y=y1;
		                z=z1;
		            }
		             public Pair(long x1, long y1) {
		                x=x1;
		                y=y1;
		    
		            }
		            
		            @Override
		            public int hashCode() {
		                return (int)(x + 31 * y);
		            }
		            public String toString() {
		                return x + " " + y+" "+z;
		            }
		            @Override
		            public boolean equals(Object o){
		                if (o == this) return true;
		                if (o.getClass() != getClass()) return false;
		                Pair t = (Pair)o;
		                return t.x == x && t.y == y&&t.z==z;
		            }
		    public int compareTo(Pair o)
		    {return (int)(x-o.x);
		     
		        }
		     
		    }
		     static class tuple{
		            int x,y,z;
		            tuple(int a,int b,int c){
		                x=a;
		                y=b;
		                z=c;
		            }
		        }
		        static class Edge{
		            int d,w;
		            Edge(int d,int w)
		            {
		                this.d=d;
		                this.w=w;
		            }
		        }
		    }

		     
