eolymp
bolt
Try our new interface for solving problems
Problems

Sum of squares

Sum of squares

Given the value of $n$. Compute the following sum: $1^2 + 2^2+ 3^2 + ... + n^2$. \InputFile One positive integer $n~(1 \le n \le 10^6)$. \OutputFile Print the value of the specified sum.
Time limit 1 second
Memory limit 128 MiB
Input example #1
3
Output example #1
14