题目描述
Problem Background
Yugo's largest city is its capital, and the differences between cities in Yugo are quite significant: the peripheral cities are almost empty, but the central cities are bustling with people.
Problem Description
Jace is the president of Alara, and like the president of Q, due to the turmoil, he must travel to Yugo's capital by car. The accompanying recorder, Tezzeret, is tasked with investigating Yugo's true strength, specifically counting the number of houses in the cities along the way.
The cities of Yugo have been numbered. While counting, Tezzeret discovered a pattern: dividing the city numbers into several continuous segments, and for each segment, multiplying the number by the square of the segment's length, then summing all these products, gives the number of houses in that city. For example: The number of houses in city 233: \(2 \times 1^2 + 3 \times 2^2 = 14\).
Tezzeret was informed that he needs to calculate the total number of houses along the route from the first city A he enters in Yugo to the capital Y. However, the calculation is too large. Can you use a computer to help him solve this computationally intensive problem?
Input Format
One line containing A and Y (1 ≤ A ≤ Y ≤ 10^15), representing the first city entered in Yugo and the capital, respectively.
Output Format
One line containing the total number of houses.
Sample Input and Output
Sample Input #1
100 111
Sample Output #1
68
Sample Input #2
233 233
Sample Output #2
14
Sample Input #3
1 9
Sample Output #3
45
Notes
For Sample 1, the total number of houses is calculated as follows: \(1 \times 1^2 + 1 \times 1^2 + 1 \times 1^2 + 2 \times 1^2 + 1 \times 1^2 + 3 \times 1^2 + ... + 1 \times 1^2 + 9 \times 1^2 + 1 \times 2^2 + 1 \times 3^2 = 68\).
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分