We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37c0953 commit 78849a7Copy full SHA for 78849a7
maths/sum_of_squares.py
@@ -4,6 +4,8 @@
4
The function takes an integer n as input and returns the sum of squares
5
from 1 to n using the formula n(n + 1)(2n + 1) / 6. This formula computes the sum efficiently
6
without the need for iteration.
7
+
8
+https://www.cuemath.com/algebra/sum-of-squares/
9
"""
10
11
def sum_of_squares(n: int) -> int:
0 commit comments