From 8841c32982eef6d9139a5594b04ddccf2f16640d Mon Sep 17 00:00:00 2001 From: dkinzer Date: Sun, 24 Sep 2017 21:01:43 -0400 Subject: [PATCH] Generate readme for palindrome-products. --- exercises/palindrome-products/README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/exercises/palindrome-products/README.md b/exercises/palindrome-products/README.md index 64aeb9127c..5194bf5f42 100644 --- a/exercises/palindrome-products/README.md +++ b/exercises/palindrome-products/README.md @@ -14,24 +14,30 @@ product: `91 * 99 = 9009`. It's possible (and indeed common) for a palindrome product to be the product of multiple combinations of numbers. For example, the palindrome product `9` has -the factors `(1, 9)`, `(3, 3)`, and `(9, 1)`. +the factors `(1, 9)` and `(3, 3)`. Write a program that given a range of integers, returns the smallest and largest -palindromic product within that range, along with all of it's factors. +palindromic product of factors within that range, along with all the factors in the range for that product. ## Example 1 Given the range `[1, 9]` (both inclusive)... -The smallest product is `1`. It's factors are `(1, 1)`. -The largest product is `9`. It's factors are `(1, 9)`, `(3, 3)`, and `(9, 1)`. +And given the list of all possible products within this range: +`[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 15, 21, 24, 27, 20, 28, 32, 36, 25, 30, 35, 40, 45, 42, 48, 54, 49, 56, 63, 64, 72, 81]` + +The palindrome products are all single digit numbers (in this case): +`[1, 2, 3, 4, 5, 6, 7, 8, 9]` + +The smallest palindrome product is `1`. Its factors are `(1, 1)`. +The largest palindrome product is `9`. Its factors are `(1, 9)` and `(3, 3)`. ## Example 2 Given the range `[10, 99]` (both inclusive)... -The smallest palindrome product is `121`. It's factors are `(11, 11)`. -The largest palindrome product is `9009`. It's factors are `(91, 99)` and `(99, 91)`. +The smallest palindrome product is `121`. Its factors are `(11, 11)`. +The largest palindrome product is `9009`. Its factors are `(91, 99)`. * * * *