Online Python Compiler

def squaresum(n) : return (n * (n + 1) * (2 * n + 1)) // 6 # Driven Program n = 10 print(squaresum(n))