Sum of squares from a to b

JavaScript Easy math

Task «Sum of squares from a to b»

Write a program that takes two integers a and b (a ≤ b) and calculates the sum of squares of all integers from a to b inclusive. It is guaranteed that the numbers do not exceed 1000.

Input Format

Two integers a and b, separated by a space.

Output Format

One integer — the sum of squares of numbers from a to b.

main.js