~/algor $ cat problems/kvadratlar-yigindisi
Sum of squares
Easy
1000 ms
64 MB
24%
A positive integer $N$ is given. Compute the sum of the squares of the first $N$ positive integers:
$$S = 1^{2} + 2^{2} + 3^{2} + \dots + N^{2}$$
Input
One positive integer $N$.
Output
One integer — the sum of squares.
Note
$1 \le N \le 1000$
Examples
Input #1
3
Output #1
14
Input #2
5
Output #2
55