文理学院程序设计在线练习


The sum of square

Time Limit: 2 Second(s)    Memory Limit: 32 MB

Total Submission(s): 186   Accepted Submission(s): 35
Problem Description

A range is given, the begin and the end are both integers. You should sum the square of all the integers in the range.

Input

The first line of the input contains an integer T(T<=100000) ,indicating the number of cases.
The following T lines each has a pair of integer A,B(0<A<B<200000),representing the range[A,B].

Output

For each case, sum the square of all the integers in the range, output the anwser in one line.

Sample Input
2
1 3
2 5
Sample Output
14
54
Hint

huge input and output,scanf and printf is recommended.