#C5243. Sum of Squares
Sum of Squares
Sum of Squares
Given an integer n, compute the sum of squares of the first n natural numbers. The sum can be calculated using the formula (S(n) = \frac{n(n+1)(2n+1)}{6}). This problem tests your ability to implement arithmetic operations and formula-based computations.
inputFormat
The input consists of a single line containing one integer n (1 ≤ n).
outputFormat
Output a single integer representing the sum of squares of the first n natural numbers.## sample
1
1