#C14767. Sum of Squares
Sum of Squares
Sum of Squares
Given a non-negative integer n, your task is to compute the sum of the squares of all integers from 1 to n. In mathematical notation, you need to calculate:
$$S = \sum_{i=1}^{n} i^2$$
For instance, when n = 5, the result is 55 because \(1^2 + 2^2 + 3^2 + 4^2 + 5^2 = 55\).
inputFormat
The input consists of a single non-negative integer n provided via stdin (e.g. 0 ≤ n ≤ 106).
outputFormat
Output a single integer representing the sum of the squares of all integers from 1 to n on stdout.
## sample0
0