summaryrefslogtreecommitdiff
path: root/go/difference-of-squares/README.md
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-08-25 04:01:30 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-08-25 04:01:30 +0200
commitff662e72997f80c940ddb6f08b032a05f8f4f285 (patch)
treec198b4c878e43dd099efba7bacfee675acafcb87 /go/difference-of-squares/README.md
parentfd484ec9cb380646a2b4017e64de2be16c04ed2a (diff)
difference-of-squares
Diffstat (limited to 'go/difference-of-squares/README.md')
-rw-r--r--go/difference-of-squares/README.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/go/difference-of-squares/README.md b/go/difference-of-squares/README.md
new file mode 100644
index 0000000..8022e2a
--- /dev/null
+++ b/go/difference-of-squares/README.md
@@ -0,0 +1,34 @@
+# Difference Of Squares
+
+Find the difference between the sum of the squares and the square of the sums of the first N natural numbers.
+
+The square of the sum of the first ten natural numbers is,
+
+ (1 + 2 + ... + 10)**2 = 55**2 = 3025
+
+The sum of the squares of the first ten natural numbers is,
+
+ 1**2 + 2**2 + ... + 10**2 = 385
+
+Hence the difference between the square of the sum of the first
+ten natural numbers and the sum of the squares is 2640:
+
+ 3025 - 385 = 2640
+
+To run the tests simply run the command `go test` in the exercise directory.
+
+If the test suite contains benchmarks, you can run these with the `-bench`
+flag:
+
+ go test -bench .
+
+For more detailed info about the Go track see the [help
+page](http://exercism.io/languages/go).
+
+## Source
+
+Problem 6 at Project Euler [http://projecteuler.net/problem=6](http://projecteuler.net/problem=6)
+
+## Submitting Incomplete Problems
+It's possible to submit an incomplete solution so you can see how others have completed the exercise.
+