Skip to main content
added 19 characters in body
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661

Find the difference between the square of the sums and sum of the squares.

This is the mathematical representation:

(∑n)^2-∑n^2 

\$\left(\sum n\right)^2-\sum n^2\$

Your program/method should take two inputs, these are your lower and upper limits of the range, and are inclusive. Limits will be whole integers above 0.

Your program/method should return the answer.

You may use whichever base you would like to, but please state in your answer which base you have used.

Test case (Base 10)

5,9      970
91,123   12087152
1,10     2640

This is usual code-golf, so the shorter the answer the better.

Find the difference between the square of the sums and sum of the squares.

This is the mathematical representation:

(∑n)^2-∑n^2 

Your program/method should take two inputs, these are your lower and upper limits of the range, and are inclusive. Limits will be whole integers above 0.

Your program/method should return the answer.

You may use whichever base you would like to, but please state in your answer which base you have used.

Test case (Base 10)

5,9      970
91,123   12087152
1,10     2640

This is usual code-golf, so the shorter the answer the better.

Find the difference between the square of the sums and sum of the squares.

This is the mathematical representation:

\$\left(\sum n\right)^2-\sum n^2\$

Your program/method should take two inputs, these are your lower and upper limits of the range, and are inclusive. Limits will be whole integers above 0.

Your program/method should return the answer.

You may use whichever base you would like to, but please state in your answer which base you have used.

Test case (Base 10)

5,9      970
91,123   12087152
1,10     2640

This is usual code-golf, so the shorter the answer the better.

Grammar
Source Link
george
  • 1.8k
  • 17
  • 27

Find the difference between the square of the sums and sum of the squares.

This is the mathematical representation:

(∑n)^2-∑n^2 

YouYour program/method should take two inputs, these are your lower and upper limits of the range, and are inclusive. Limits will be whole integers above 0.

Your program/method should return the answer.

You may use whichever base you would like to, but please state in your answer which base you have used.

Test case (Base 10)

5,9      970
91,123   12087152
1,10     2640

This is usual code-golf, so the shorter the answer the better.

Find the difference between the square of the sums and sum of the squares.

This is the mathematical representation:

(∑n)^2-∑n^2 

You program/method should take two inputs, these are your lower and upper limits of the range, and are inclusive. Limits will be whole integers above 0.

Your program/method should return the answer.

You may use whichever base you would like to, but please state in your answer which base you have used.

Test case (Base 10)

5,9      970
91,123   12087152
1,10     2640

This is usual code-golf, so the shorter the answer the better.

Find the difference between the square of the sums and sum of the squares.

This is the mathematical representation:

(∑n)^2-∑n^2 

Your program/method should take two inputs, these are your lower and upper limits of the range, and are inclusive. Limits will be whole integers above 0.

Your program/method should return the answer.

You may use whichever base you would like to, but please state in your answer which base you have used.

Test case (Base 10)

5,9      970
91,123   12087152
1,10     2640

This is usual code-golf, so the shorter the answer the better.

Tweeted twitter.com/StackCodeGolf/status/744923135095488512
edited tags
Link
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975
added 13 characters in body
Source Link
george
  • 1.8k
  • 17
  • 27
Loading
added 43 characters in body
Source Link
george
  • 1.8k
  • 17
  • 27
Loading
Source Link
george
  • 1.8k
  • 17
  • 27
Loading