diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2019-08-12 12:34:32 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2019-08-12 12:34:32 +0100 |
| commit | 82fa944ce1e0bc82d2729ba9acbf973ded89ec8b (patch) | |
| tree | 056454d8f65baa19c475874c2daa079a9ec6dce7 /challenge-021/duncan-c-white/README | |
| parent | ac052e07dc15810f5b724202b0e998b3444f803e (diff) | |
| download | perlweeklychallenge-club-82fa944ce1e0bc82d2729ba9acbf973ded89ec8b.tar.gz perlweeklychallenge-club-82fa944ce1e0bc82d2729ba9acbf973ded89ec8b.tar.bz2 perlweeklychallenge-club-82fa944ce1e0bc82d2729ba9acbf973ded89ec8b.zip | |
- Added folder for Challenge - 021.
Diffstat (limited to 'challenge-021/duncan-c-white/README')
| -rw-r--r-- | challenge-021/duncan-c-white/README | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/challenge-021/duncan-c-white/README b/challenge-021/duncan-c-white/README new file mode 100644 index 0000000000..bf5b030e87 --- /dev/null +++ b/challenge-021/duncan-c-white/README @@ -0,0 +1,25 @@ +Challenge 1: "Write a script to accept a string from command line and +split it on change of character. For example, if the string is "ABBCDEEF", +then it should split like 'A', 'BB', 'C', 'D', 'EE', 'F'." + +My notes: Clearly defined, sounds like a job for regexes. + + +Challenge 2: "Write a script to print the smallest pair of Amicable Numbers." + +Amicable numbers are two different numbers so related that the sum of the +proper divisors of each is equal to the other number. (A proper divisor +of a number is a positive factor of that number other than the number +itself. For example, the proper divisors of 6 are 1, 2, and 3.) + +The smallest pair of amicable numbers is (220, 284). They are amicable +because the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, +55 and 110, of which the sum is 284; and the proper divisors of 284 are 1, +2, 4, 71 and 142, of which the sum is 220. + +The first ten amicable pairs are: (220, 284), (1184, 1210), (2620, +2924), (5020, 5564), (6232, 6368), (10744, 10856), (12285, 14595), +(17296, 18416), (63020, 76084), and (66928, 66992) + +My notes: Another clearly described problem. Obvious method involves +a bit of caching. |
