Sum of squares of numbers from 1 to N
Go
Easy
loops
Task «Sum of squares of numbers from 1 to N»
Write a program that reads a positive integer N and outputs the sum of squares of all integers from 1 to N inclusive. Use a for loop to calculate the sum. It is guaranteed that N does not exceed 1000.
Input Format
One integer N (1 ≤ N ≤ 1000).
Output Format
One integer — the sum of squares of numbers from 1 to N.
Examples
Example 1
INPUT
1
OUTPUT
1
Example 2
INPUT
10
OUTPUT
385
Example 3
INPUT
Война и мир
Лев Толстой
1869
OUTPUT
Title: Война и мир, Author: Лев Толстой, Year: 1869
Example 4
INPUT
1
5
OUTPUT
1
main.go