// func SumSquareDifference receives the max range// and returns the difference of the sumSquare and the squareSum.funcSumSquareDifference(xint)int{sum:=0sumSquare:=0fori:=1;i<=x;i++{sum+=isumSquare+=i*i}squareSum:=sum*sumreturnsquareSum-sumSquare}
You can see the complete program on the playground link.
I have included a block that confirms that my function provides the expected response.
I then start a timer so I can print the elapsed time to run the function.
After printing the results, I include a comment defining the Output, If the output changes it will generate an error on my computer.
The language is Go but it is more a C++ style, I am not the best Go programmer.
Code needs to be readable, compilers can do the optimization.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Go
goplay.space/#rQ0XekiCknZ
You can see the complete program on the playground link.