Sha256: 0c8e2ba823916482ff6482b44f431459bf4f7f9ff57e3785f4afc1a95fd704f4
Contents?: true
Size: 1.4 KB
Versions: 96
Compression:
Stored size: 1.4 KB
Contents
# Difference Of Squares Find the difference between the square of the sum and the sum of the squares of the first N natural numbers. The square of the sum of the first ten natural numbers is (1 + 2 + ... + 10)² = 55² = 3025. The sum of the squares of the first ten natural numbers is 1² + 2² + ... + 10² = 385. Hence the difference between the square of the sum of the first ten natural numbers and the sum of the squares of the first ten natural numbers is 3025 - 385 = 2640. * * * * For installation and learning resources, refer to the [exercism Racket page](http://exercism.io/languages/racket). You can run the provided tests through DrRacket, or via the command line. To run the test through DrRacket, simply open the test file and click the 'Run' button in the upper right. To run the test from the command line, simply run the test from the exercise directory. For example, if the test suite is called `hello-world-test.rkt`, you can run the following command: ``` raco test hello-world-test.rkt ``` which will display the following: ``` raco test: (submod "hello-world-test.rkt" test) 2 success(es) 0 failure(s) 0 error(s) 2 test(s) run 0 2 tests passed ``` ## Source Problem 6 at Project Euler [http://projecteuler.net/problem=6](http://projecteuler.net/problem=6) ## Submitting Incomplete Solutions It's possible to submit an incomplete solution so you can see how others have completed the exercise.
Version data entries
96 entries across 96 versions & 1 rubygems